File size: 38,325 Bytes
10bf19f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 |
{
"cells": [
{
"cell_type": "markdown",
"id": "dc3852ca",
"metadata": {},
"source": [
"# Evaluate Classification"
]
},
{
"cell_type": "markdown",
"id": "3a2d9fbf",
"metadata": {},
"source": [
"## Setup"
]
},
{
"cell_type": "markdown",
"id": "45140c6e",
"metadata": {},
"source": [
"#### Load the API key and libaries."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "e7bf1b8e",
"metadata": {
"height": 115,
"tags": []
},
"outputs": [],
"source": [
"from src.Language_Evaluation_LC import llm_language_evaluation\n",
"from src.data_analysis import run_analysis\n",
"import pandas as pd"
]
},
{
"cell_type": "markdown",
"id": "10e95383",
"metadata": {
"height": 30
},
"source": [
"#### Load the Constants"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "464a2aaa",
"metadata": {
"height": 47,
"tags": []
},
"outputs": [],
"source": [
"PATH = 'data/full_dataset.csv'\n",
"MODEL = 'gpt-3.5-turbo-0125' #\"gpt-3.5-turbo\" \"gpt-4-turbo-preview\"\n",
"TEMPERATURE = 0.0\n",
"N_REPETITIONS = 0\n",
"REASONING = False\n",
"LANGUAGES = ['spanish', 'tagalog', 'portuguese', 'english']"
]
},
{
"cell_type": "markdown",
"id": "92663014",
"metadata": {},
"source": [
"#### Run The Experiments:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "7c7ccfa1",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Run evaluation:\n",
"llm_language_evaluation(path=PATH, model=MODEL, temperature=TEMPERATURE, n_repetitions=N_REPETITIONS, reasoning=REASONING, languages=LANGUAGES)"
]
},
{
"cell_type": "markdown",
"id": "079dcbc4",
"metadata": {},
"source": [
"#### See the results"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "a58184aa",
"metadata": {
"height": 30,
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>ID</th>\n",
" <th>year</th>\n",
" <th>test</th>\n",
" <th>theme</th>\n",
" <th>subtheme</th>\n",
" <th>portuguese</th>\n",
" <th>spanish</th>\n",
" <th>english</th>\n",
" <th>tagalog</th>\n",
" <th>answer</th>\n",
" <th>responses_spanish</th>\n",
" <th>responses_spanish_0</th>\n",
" <th>responses_tagalog</th>\n",
" <th>responses_tagalog_0</th>\n",
" <th>responses_portuguese</th>\n",
" <th>responses_portuguese_0</th>\n",
" <th>responses_english</th>\n",
" <th>responses_english_0</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica I</td>\n",
" <td>Anatomia</td>\n",
" <td>cornea</td>\n",
" <td>Em qual regi茫o ocular c茅lulas caliciformes s茫o...</td>\n",
" <td>驴En qu茅 regi贸n ocular se encuentran fisiol贸gic...</td>\n",
" <td>In which ocular region are caliciform cells ph...</td>\n",
" <td>Aling bahagi ng mata ay kung saan matatagpuan ...</td>\n",
" <td>D</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" <td>a</td>\n",
" <td>a</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica I</td>\n",
" <td>Anatomia</td>\n",
" <td>retina</td>\n",
" <td>Assinale a alternativa que melhor correlaciona...</td>\n",
" <td>Marque la alternativa que mejor correlaciona l...</td>\n",
" <td>Mark the alternative that best correlates the ...</td>\n",
" <td>Ipagpares ang bahagi ng retina sa Hanay B sa t...</td>\n",
" <td>B</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" <td>a</td>\n",
" <td>a</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica I</td>\n",
" <td>Anatomia</td>\n",
" <td>cornea</td>\n",
" <td>Ordene as tr锚s denomina莽玫es celulares encontra...</td>\n",
" <td>Ordene los tres nombres de c茅lulas que se encu...</td>\n",
" <td>Order the three cell names found in the cornea...</td>\n",
" <td>Ipagsunud-sunod ang mga cells ng corneal epith...</td>\n",
" <td>A</td>\n",
" <td>c</td>\n",
" <td>c</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>c</td>\n",
" <td>c</td>\n",
" <td>C</td>\n",
" <td>C</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica I</td>\n",
" <td>Anatomia</td>\n",
" <td>cornea</td>\n",
" <td>Sobre a membrana de Descemet da c贸rnea, 茅 corr...</td>\n",
" <td>Con respecto a la membrana de la c贸rnea de Des...</td>\n",
" <td>Regarding Descemet's membrane of the cornea, i...</td>\n",
" <td>Tama tungkol sa Descemet's membrane ng cornea:...</td>\n",
" <td>C</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>C</td>\n",
" <td>C</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica I</td>\n",
" <td>Anatomia</td>\n",
" <td>cornea</td>\n",
" <td>Sobre a camada lip铆dica do filme lacrimal, ass...</td>\n",
" <td>Respecto a la capa lip铆dica de la pel铆cula lag...</td>\n",
" <td>About the lipidic layer of the lacrimal film, ...</td>\n",
" <td>Piliin ang tamang sagot tungkol sa lipid layer...</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>A</td>\n",
" <td>A</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>159</th>\n",
" <td>161</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica II</td>\n",
" <td>Cristalino/Catarata</td>\n",
" <td>NaN</td>\n",
" <td>Ap贸s bloqueio retrobulbar para realiza莽茫o de c...</td>\n",
" <td>Tras el bloqueo retrobulbar para realizar la c...</td>\n",
" <td>After retrobulbar block for phacoemulsificatio...</td>\n",
" <td>Matapos ang retrobulbar block para sa phacoemu...</td>\n",
" <td>C</td>\n",
" <td>a</td>\n",
" <td>a</td>\n",
" <td>d</td>\n",
" <td>d</td>\n",
" <td>C</td>\n",
" <td>C</td>\n",
" <td>a</td>\n",
" <td>a</td>\n",
" </tr>\n",
" <tr>\n",
" <th>160</th>\n",
" <td>162</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica II</td>\n",
" <td>Cristalino/Catarata</td>\n",
" <td>NaN</td>\n",
" <td>Sobre a biometria em olhos tamponados por 贸leo...</td>\n",
" <td>Respecto a la biometr铆a en ojos tamponados con...</td>\n",
" <td>Regarding biometrics in eyes covered with sili...</td>\n",
" <td>Alin sa mga sumusunod na pahayag patungkol sa ...</td>\n",
" <td>D</td>\n",
" <td>A</td>\n",
" <td>A</td>\n",
" <td>A</td>\n",
" <td>A</td>\n",
" <td>A</td>\n",
" <td>A</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" </tr>\n",
" <tr>\n",
" <th>161</th>\n",
" <td>163</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica II</td>\n",
" <td>Cristalino/Catarata</td>\n",
" <td>NaN</td>\n",
" <td>Assinale a alternativa que cont茅m, respectivam...</td>\n",
" <td>Seleccionar la alternativa que contenga, respe...</td>\n",
" <td>Check the alternative that contains, respectiv...</td>\n",
" <td>Alin sa mga sumusunod na tambalan patungkol sa...</td>\n",
" <td>A</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" <td>D</td>\n",
" </tr>\n",
" <tr>\n",
" <th>162</th>\n",
" <td>164</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica II</td>\n",
" <td>Cristalino/Catarata</td>\n",
" <td>NaN</td>\n",
" <td>Sobre a preven莽茫o de endoftalmite em cirurgia ...</td>\n",
" <td>En cuanto a la prevenci贸n de endoftalmitis en ...</td>\n",
" <td>Regarding the prevention of endophthalmitis in...</td>\n",
" <td>Alin sa mga sumusunod na pamamaraan upang mapi...</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>C</td>\n",
" <td>C</td>\n",
" <td>B</td>\n",
" <td>B</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" </tr>\n",
" <tr>\n",
" <th>163</th>\n",
" <td>165</td>\n",
" <td>2022</td>\n",
" <td>Te贸rica II</td>\n",
" <td>Cristalino/Catarata</td>\n",
" <td>NaN</td>\n",
" <td>Ap贸s realizar as fraturas do n煤cleo com a t茅cn...</td>\n",
" <td>Despu茅s de realizar las fracturas del n煤cleo c...</td>\n",
" <td>After performing the core fractures with the d...</td>\n",
" <td>Matapos isagawa ang core fractures gamit ang d...</td>\n",
" <td>C</td>\n",
" <td>d</td>\n",
" <td>d</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" <td>a</td>\n",
" <td>a</td>\n",
" <td>b</td>\n",
" <td>b</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>164 rows 脳 18 columns</p>\n",
"</div>"
],
"text/plain": [
" ID year test theme subtheme \\\n",
"0 1 2022 Te贸rica I Anatomia cornea \n",
"1 2 2022 Te贸rica I Anatomia retina \n",
"2 3 2022 Te贸rica I Anatomia cornea \n",
"3 4 2022 Te贸rica I Anatomia cornea \n",
"4 5 2022 Te贸rica I Anatomia cornea \n",
".. ... ... ... ... ... \n",
"159 161 2022 Te贸rica II Cristalino/Catarata NaN \n",
"160 162 2022 Te贸rica II Cristalino/Catarata NaN \n",
"161 163 2022 Te贸rica II Cristalino/Catarata NaN \n",
"162 164 2022 Te贸rica II Cristalino/Catarata NaN \n",
"163 165 2022 Te贸rica II Cristalino/Catarata NaN \n",
"\n",
" portuguese \\\n",
"0 Em qual regi茫o ocular c茅lulas caliciformes s茫o... \n",
"1 Assinale a alternativa que melhor correlaciona... \n",
"2 Ordene as tr锚s denomina莽玫es celulares encontra... \n",
"3 Sobre a membrana de Descemet da c贸rnea, 茅 corr... \n",
"4 Sobre a camada lip铆dica do filme lacrimal, ass... \n",
".. ... \n",
"159 Ap贸s bloqueio retrobulbar para realiza莽茫o de c... \n",
"160 Sobre a biometria em olhos tamponados por 贸leo... \n",
"161 Assinale a alternativa que cont茅m, respectivam... \n",
"162 Sobre a preven莽茫o de endoftalmite em cirurgia ... \n",
"163 Ap贸s realizar as fraturas do n煤cleo com a t茅cn... \n",
"\n",
" spanish \\\n",
"0 驴En qu茅 regi贸n ocular se encuentran fisiol贸gic... \n",
"1 Marque la alternativa que mejor correlaciona l... \n",
"2 Ordene los tres nombres de c茅lulas que se encu... \n",
"3 Con respecto a la membrana de la c贸rnea de Des... \n",
"4 Respecto a la capa lip铆dica de la pel铆cula lag... \n",
".. ... \n",
"159 Tras el bloqueo retrobulbar para realizar la c... \n",
"160 Respecto a la biometr铆a en ojos tamponados con... \n",
"161 Seleccionar la alternativa que contenga, respe... \n",
"162 En cuanto a la prevenci贸n de endoftalmitis en ... \n",
"163 Despu茅s de realizar las fracturas del n煤cleo c... \n",
"\n",
" english \\\n",
"0 In which ocular region are caliciform cells ph... \n",
"1 Mark the alternative that best correlates the ... \n",
"2 Order the three cell names found in the cornea... \n",
"3 Regarding Descemet's membrane of the cornea, i... \n",
"4 About the lipidic layer of the lacrimal film, ... \n",
".. ... \n",
"159 After retrobulbar block for phacoemulsificatio... \n",
"160 Regarding biometrics in eyes covered with sili... \n",
"161 Check the alternative that contains, respectiv... \n",
"162 Regarding the prevention of endophthalmitis in... \n",
"163 After performing the core fractures with the d... \n",
"\n",
" tagalog answer \\\n",
"0 Aling bahagi ng mata ay kung saan matatagpuan ... D \n",
"1 Ipagpares ang bahagi ng retina sa Hanay B sa t... B \n",
"2 Ipagsunud-sunod ang mga cells ng corneal epith... A \n",
"3 Tama tungkol sa Descemet's membrane ng cornea:... C \n",
"4 Piliin ang tamang sagot tungkol sa lipid layer... B \n",
".. ... ... \n",
"159 Matapos ang retrobulbar block para sa phacoemu... C \n",
"160 Alin sa mga sumusunod na pahayag patungkol sa ... D \n",
"161 Alin sa mga sumusunod na tambalan patungkol sa... A \n",
"162 Alin sa mga sumusunod na pamamaraan upang mapi... B \n",
"163 Matapos isagawa ang core fractures gamit ang d... C \n",
"\n",
" responses_spanish responses_spanish_0 responses_tagalog \\\n",
"0 b b a \n",
"1 b b B \n",
"2 c c D \n",
"3 B B D \n",
"4 B B A \n",
".. ... ... ... \n",
"159 a a d \n",
"160 A A A \n",
"161 D D D \n",
"162 B B C \n",
"163 d d b \n",
"\n",
" responses_tagalog_0 responses_portuguese responses_portuguese_0 \\\n",
"0 a b b \n",
"1 B b b \n",
"2 D c c \n",
"3 D D D \n",
"4 A B B \n",
".. ... ... ... \n",
"159 d C C \n",
"160 A A A \n",
"161 D D D \n",
"162 C B B \n",
"163 b a a \n",
"\n",
" responses_english responses_english_0 \n",
"0 b b \n",
"1 a a \n",
"2 C C \n",
"3 C C \n",
"4 B B \n",
".. ... ... \n",
"159 a a \n",
"160 D D \n",
"161 D D \n",
"162 b b \n",
"163 b b \n",
"\n",
"[164 rows x 18 columns]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"if N_REPETITIONS > 1:\n",
" df = pd.read_csv(f\"responses/{MODEL}_Temperature{str(TEMPERATURE).replace('.', '_')}_{N_REPETITIONS}Repetitions.csv\")\n",
"else:\n",
" df = pd.read_csv(f\"responses/{MODEL}_Temperature{str(TEMPERATURE).replace('.', '_')}.csv\")\n",
"\n",
"df"
]
},
{
"cell_type": "markdown",
"id": "041dc525",
"metadata": {},
"source": [
"### Data Analysis"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "85f6bb97",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"TEMPERATURE = str(TEMPERATURE).replace('.', '_')\n",
"\n",
"run_analysis(model=MODEL, temperature=TEMPERATURE, n_repetitions=N_REPETITIONS, languages=LANGUAGES)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "dffeddc1",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>test</th>\n",
" <th>year</th>\n",
" <th>theme</th>\n",
" <th>match_spanish</th>\n",
" <th>match_tagalog</th>\n",
" <th>match_portuguese</th>\n",
" <th>match_english</th>\n",
" <th>Total</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>anatomy</td>\n",
" <td>7</td>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" <td>7</td>\n",
" <td>21</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>cornea</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>embryology</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>genetics</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>glaucoma</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>oncology</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>pharmacology</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>refraction</td>\n",
" <td>6</td>\n",
" <td>5</td>\n",
" <td>7</td>\n",
" <td>4</td>\n",
" <td>12</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>Te贸rica I</td>\n",
" <td>2022</td>\n",
" <td>retina</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>contact lenses</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>cornea</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>5</td>\n",
" <td>9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>cornea/lens</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>glaucoma</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>glaucoma/uveitis</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>lens/cataract</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>4</td>\n",
" <td>8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>low vision</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>neuro-ophthalmology</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>ocular plastic surgery</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>5</td>\n",
" <td>7</td>\n",
" <td>16</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>oncology/ocular plastic surgery</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>optics</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>optics/refraction</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>pharmacology</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>pharmacology/glaucoma</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>refraction</td>\n",
" <td>12</td>\n",
" <td>11</td>\n",
" <td>10</td>\n",
" <td>9</td>\n",
" <td>19</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>refraction/low vision</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>refractive surgery</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>retina</td>\n",
" <td>7</td>\n",
" <td>3</td>\n",
" <td>5</td>\n",
" <td>7</td>\n",
" <td>11</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>retina/oncology</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>strabismus</td>\n",
" <td>6</td>\n",
" <td>4</td>\n",
" <td>7</td>\n",
" <td>6</td>\n",
" <td>11</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>Te贸rica II</td>\n",
" <td>2022</td>\n",
" <td>uveitis</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>8</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" test year theme match_spanish \\\n",
"0 Te贸rica I 2022 anatomy 7 \n",
"1 Te贸rica I 2022 cornea 0 \n",
"2 Te贸rica I 2022 embryology 0 \n",
"3 Te贸rica I 2022 genetics 0 \n",
"4 Te贸rica I 2022 glaucoma 1 \n",
"5 Te贸rica I 2022 oncology 1 \n",
"6 Te贸rica I 2022 pharmacology 2 \n",
"7 Te贸rica I 2022 refraction 6 \n",
"8 Te贸rica I 2022 retina 1 \n",
"9 Te贸rica II 2022 contact lenses 1 \n",
"10 Te贸rica II 2022 cornea 4 \n",
"11 Te贸rica II 2022 cornea/lens 1 \n",
"12 Te贸rica II 2022 glaucoma 2 \n",
"13 Te贸rica II 2022 glaucoma/uveitis 1 \n",
"14 Te贸rica II 2022 lens/cataract 4 \n",
"15 Te贸rica II 2022 low vision 1 \n",
"16 Te贸rica II 2022 neuro-ophthalmology 3 \n",
"17 Te贸rica II 2022 ocular plastic surgery 7 \n",
"18 Te贸rica II 2022 oncology/ocular plastic surgery 1 \n",
"19 Te贸rica II 2022 optics 1 \n",
"20 Te贸rica II 2022 optics/refraction 0 \n",
"21 Te贸rica II 2022 pharmacology 3 \n",
"22 Te贸rica II 2022 pharmacology/glaucoma 0 \n",
"23 Te贸rica II 2022 refraction 12 \n",
"24 Te贸rica II 2022 refraction/low vision 0 \n",
"25 Te贸rica II 2022 refractive surgery 2 \n",
"26 Te贸rica II 2022 retina 7 \n",
"27 Te贸rica II 2022 retina/oncology 0 \n",
"28 Te贸rica II 2022 strabismus 6 \n",
"29 Te贸rica II 2022 uveitis 3 \n",
"\n",
" match_tagalog match_portuguese match_english Total \n",
"0 6 6 7 21 \n",
"1 0 1 1 1 \n",
"2 0 0 0 2 \n",
"3 1 1 0 2 \n",
"4 1 1 1 1 \n",
"5 1 1 1 1 \n",
"6 1 2 2 3 \n",
"7 5 7 4 12 \n",
"8 0 0 1 1 \n",
"9 0 0 1 3 \n",
"10 1 3 5 9 \n",
"11 1 1 1 1 \n",
"12 3 3 2 8 \n",
"13 0 1 0 1 \n",
"14 2 5 4 8 \n",
"15 0 1 0 1 \n",
"16 2 3 3 7 \n",
"17 7 5 7 16 \n",
"18 0 1 1 3 \n",
"19 0 0 0 1 \n",
"20 0 1 0 1 \n",
"21 2 2 2 6 \n",
"22 1 1 0 1 \n",
"23 11 10 9 19 \n",
"24 0 0 0 2 \n",
"25 1 2 2 2 \n",
"26 3 5 7 11 \n",
"27 0 0 0 1 \n",
"28 4 7 6 11 \n",
"29 3 3 4 8 "
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"N_REPETITIONS = 1 if N_REPETITIONS < 1 else N_REPETITIONS\n",
"pd.read_csv(f'results/results_{MODEL}_Temperature{TEMPERATURE}_Repetitions{N_REPETITIONS}/matches_results_{MODEL}.csv')"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "c23866b3-c0c6-42de-968c-6994b2b8b7fa",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"test Te贸rica ITe贸rica ITe贸rica ITe贸rica ITe贸rica IT...\n",
"year 60660\n",
"theme anatomycorneaembryologygeneticsglaucomaoncolog...\n",
"match_spanish 77\n",
"match_tagalog 56\n",
"match_portuguese 73\n",
"match_english 71\n",
"Total 164\n",
"dtype: object"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pd.read_csv(f'results/results_{MODEL}_Temperature{TEMPERATURE}_Repetitions{N_REPETITIONS}/matches_results_{MODEL}.csv').sum()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1dcad7d6-7647-49c5-9804-17db4dfbc5a3",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|