ncbi-nlp / bluebert

BlueBERT, pre-trained on PubMed abstracts and clinical notes (MIMIC-III).
https://arxiv.org/abs/1906.05474
Other
558 stars 78 forks source link

How to interpret STS output. #34

Closed DrameMariama closed 3 years ago

DrameMariama commented 4 years ago

I'm doing a binary sentence similarity where labels are 0 and 1. the prediction output is as follow:

MSE = 0.12034694
global_step = 0
label_ids = [0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 1. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 1. 1. 0. 0. 0. 0. 0. 0. 1. 0. 0. 1. 0.
 1. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 1. 0. 0. 0. 1. 0. 1. 1. 1. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 1. 0.
 1. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 0. 1. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 1. 0. 0. 1. 0. 0. 1. 0. 1. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 1. 0. 0. 0. 0. 0. 0. 1. 0. 1. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 1. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 0. 0. 1. 0. 0. 1. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0.
 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 0. 0. 0. 0. 1. 1. 0. 0.
 1. 0. 0. 1. 1. 0. 0. 1. 0. 0. 0. 1. 1. 1. 0. 0. 0. 0. 1. 1. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 1.]
loss = 0.12034694
pearson = 0.6646034
pred = [ 0.9968272  -0.03098304  0.8957741  -0.07417393 -0.09186892 -0.0707963
  0.74726754 -0.05655669 -0.09204277 -0.03543881 -0.07745712 -0.05300986
  1.1416211  -0.08503725 -0.09837753  1.004629   -0.07550014  0.00657438
 -0.08694188 -0.02797052 -0.08749591 -0.08376077  0.00488611 -0.07453079
 -0.04001749  0.9580759   0.61144847 -0.02444758 -0.06606578  1.0700202
 -0.08189891 -0.09389639 -0.04471161 -0.07932074 -0.08922736  1.072242
  1.1144217  -0.0899142  -0.05957434 -0.01848362 -0.08165789  0.56197506
 -0.10288966  0.9589868  -0.08966823 -0.07423133  0.9501468  -0.08691276
  1.0427929  -0.07580899 -0.08085545  0.05613842 -0.06668296  0.67278963
  0.04689811 -0.08730051 -0.09488467  0.7494736   0.59106404 -0.05784546
 -0.0580256   0.5586943   0.82942    -0.08266563 -0.08970116 -0.07241884
 -0.08084895 -0.0888657   0.16364944 -0.08838011 -0.08021087 -0.07139066
  0.98460495 -0.09568951 -0.08403315 -0.03191408  0.84516126 -0.07047645
  1.04264     1.1047416   0.9219344   0.93681306  0.00817167 -0.08582229
 -0.09332561 -0.05327708 -0.08006877 -0.06815267  0.08796047 -0.10083354
 -0.08134227 -0.0519708  -0.07535361  0.02822088  0.8645804  -0.08838581
  0.05759583 -0.09652802 -0.0544436   0.8467474   1.011137   -0.0152052
 -0.09230338 -0.08920024  0.9547418  -0.09625152 -0.07814157 -0.05981593
 -0.06737825 -0.0525138  -0.07601891  0.00535123 -0.09302492 -0.05335039
  0.57089394  0.9735016  -0.07029892  0.9383386   0.17835245  0.07288147
 -0.05812666 -0.09008455  0.16482374 -0.06855011 -0.07975283 -0.0688867
  0.16806357 -0.08691715  0.8265008  -0.05552685 -0.04530346  0.9801875
  0.9665445  -0.10243599 -0.09238719 -0.08140092 -0.07281174 -0.09341179
 -0.08653723 -0.04425526 -0.04663768 -0.07175027 -0.05161241 -0.07474666
 -0.08247717 -0.07625985  0.05558392 -0.09737069 -0.08582785 -0.08285176
 -0.09085771 -0.08242864 -0.06997188 -0.09492967  0.87413186  0.00221197
 -0.09681983  1.1069126  -0.07090654  1.0427476   0.97657245 -0.05734477
 -0.06612358  0.17080042  0.04073562  0.8623907  -0.06221616 -0.07726647
 -0.08040509  0.35656622  0.88446796  0.01673024 -0.09752481 -0.09414034
 -0.06563986 -0.05257557 -0.08664538 -0.03824814  0.99862784  0.9537769
 -0.0507925   1.0611311   0.26432222  0.02389601 -0.08002971  0.24677996
 -0.04190464 -0.07924199  0.44772255  0.16013458  1.1142675  -0.06626779
  0.11091595  1.0015993   0.98124903 -0.08817458 -0.0803092  -0.00456336
  1.0019325  -0.09834503 -0.07607836  0.9602315  -0.050502   -0.09498988
  0.93423295 -0.08353204  0.95852834 -0.08302109 -0.03645961 -0.0837692
 -0.04907575 -0.08840061 -0.04175755  0.05482076  0.98270017 -0.05114298
 -0.07228722  0.81660086 -0.07696462 -0.08263256  1.0464804  -0.08961527
  0.01591448  0.03492247 -0.03415895 -0.07692334  0.7936482   0.98901486
  1.0336974  -0.01263706  0.64612895 -0.07319017 -0.08374722  0.98839957
 -0.0816884  -0.08701541  0.9753411   0.38509053 -0.08011929 -0.08158413
 -0.08267076 -0.07939766 -0.0851294  -0.10770355 -0.04284238 -0.09182031
  1.0836056  -0.07639952 -0.09889527 -0.01996168 -0.09211037 -0.07140023
 -0.07940755 -0.08331279 -0.06124184 -0.08752528 -0.07155015  1.06396
 -0.09301544 -0.07780191  0.18636224  1.0234824  -0.06206534 -0.10370414
  0.20406811 -0.09179069 -0.08385491 -0.07036848 -0.08004359  1.04012
 -0.08071671  0.8393969   0.0629826  -0.05980002 -0.09884399 -0.04910354
 -0.06946485 -0.09015001  1.0906504   0.986099   -0.05425195  0.5622222
  0.935292   -0.08033577  1.0642971   1.0911734  -0.08062124  0.7644436
  0.87184227 -0.07042552 -0.08266561  0.9998966  -0.03840258 -0.08939464
  1.009424    0.25307548 -0.09172264 -0.08039551 -0.07240216  1.0881265
  0.0290037   0.9582196   1.0014933  -0.00588964  0.08343956 -0.10145007
  1.1023728   1.0932642  -0.09266437 -0.09243488 -0.08602741  0.18427256
 -0.08351617  0.9532236   1.0550426  -0.09006116 -0.08440115  0.9653421
 -0.07703653  0.9551673 ]
spearman = 0.31011906

label_ids seems to be the true labels from the test file. But I don't really now how to interpret the pred list @yfpeng

yfpeng commented 3 years ago

The element in the pred list represents the similarity between two sentences.