Skip to content
Snippets Groups Projects
Commit 3836f30c authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME
Browse files

Add generic loading function and corresponding test

parent 7ef58230
Branches
Tags
2 merge requests!54Refactors the score loading and scripts functionality,!50Generic loading input file
Pipeline #
-1 -0.33446709030362043
-1 -0.9908558000200516
1 0.9901621743388325
1 0.6174001753934653
-1 -0.5722994290800509
1 0.9506541899127345
-1 -0.7429009208056025
-1 -0.10475177377501388
-1 -0.9426353550236051
-1 -0.5985885232041182
1 0.9361978237334196
1 0.11423319986345848
1 0.4331546753361999
-1 -0.6822985899477265
1 0.07309599981474157
1 0.3126579471059683
-1 -0.04377316151823929
1 0.6461300631422107
1 0.4781446108987826
1 0.8658893631698037
1 0.12743736905560188
1 0.7674286714306664
1 0.44127417960484316
1 0.8382160335334696
-1 -0.3304264354387867
-1 nan
1 0.7372072796408715
-1 -0.6478402796345242
1 0.4064185958852391
-1 -0.2062254857223993
-1 -0.9166050291791565
-1 -0.8437947376130626
1 0.9729322847753292
-1 -0.13190322649714226
-1 0.6279857808956448
-1 -0.5048777119343162
-1 -0.33780052941672145
1 0.514126397773659
1 0.47740899041646934
1 0.764886492586921
1 0.10456919686323052
-1 -0.08563802350813599
-1 -0.1290800139179289
-1 -0.874861839417935
1 0.7745058508729439
-1 -0.27011378314905365
1 0.990186941760969
-1 -0.32625654005789406
1 0.3649209575907104
1 0.10442282969445693
-1 -0.42864795227584773
1 0.496543518807127
1 -0.4981233115701995
1 0.6925107964267423
1 0.20972107856264732
-1 -0.6157222436680707
-1 -0.3135153456307491
-1 -0.96582545098555
1 0.2021770858284171
-1 -0.4172860722333398
1 0.4389700107766177
-1 0.42866195170873334
-1 -0.12538229252964128
1 0.05108958071369574
1 0.4090470498796204
-1 -0.22473540084022647
1 0.5445852695609619
1 -0.07727773202899013
1 0.3681197162422798
-1 0.42707611742831775
-1 -0.21918227628578757
1 0.02799412557318326
-1 -0.018212959576483723
-1 -0.6505966651731443
1 0.3951273936321953
1 0.777869125984542
1 0.26320311291826504
1 0.07604500953188609
1 0.05660505672484306
-1 -0.7423354086156422
1 0.8724281570482841
1 0.6422009887649296
-1 -0.4412804145960707
1 0.2036916802263744
1 0.1826613886427264
-1 -0.5861380983383508
1 0.7139603291761918
1 0.07775486330406078
1 0.8316361091252318
1 0.024347707826836595
1 0.6352832002703965
-1 -0.44073428303725315
1 0.37028098697357725
1 0.18447896680825515
1 nan
1 -0.7667708045439243
1 0.8701664362424539
1 0.8368229854418467
1 0.724089371658025
-1 -0.9812864428365153
1 0.14043520662880593
-1 -0.0390223752622767
-1 -0.19925185471113305
1 0.905625696165709
-1 -0.5829436717240677
-1 -0.1004694447339789
1 0.4293950550627512
1 0.3830680211690045
-1 -0.4469405616144002
1 0.004438714679316114
1 0.6506785572857083
1 0.17227941014580295
-1 -0.07848144328328543
1 nan
-1 -0.9316105519515243
-1 0.9515595186816419
1 0.9763749116527503
1 0.9771529891946009
1 0.02609774914717433
-1 -0.24968289755881168
1 0.6794246777561639
-1 -0.3813537512211638
1 0.2370370722086237
-1 -0.20916116393145812
-1 -0.3362386436506244
1 0.848184365869606
-1 -0.5874516026982024
1 0.06365579553763201
-1 -0.308523780547171
-1 -0.942103747681412
-1 -0.3896066294086489
-1 -0.3714802000214268
-1 -0.8195139746342435
-1 -0.6156803901004715
1 0.6712598947032993
1 0.225690236216205
-1 -0.37371043889195255
1 0.24998402093990557
-1 -0.9676276142723543
1 0.6878368142388813
1 0.20179880555698326
-1 -0.998256389076444
-1 -0.7799179120995836
-1 0.6353628193324035
-1 -0.46406654339481324
1 0.08289395558526325
-1 -0.646859068054602
1 0.9915946679359302
1 0.2789522673717162
1 0.8049756739428984
1 0.14130103214036072
1 0.3546334904883961
-1 -0.672516524145097
-1 -0.6825131120745611
-1 -0.22515387466396453
1 0.9072463270506894
1 0.7785577309483664
-1 -0.7805746780629292
-1 -0.4025687504325721
1 0.4582816075446663
1 0.20965212478314665
-1 -0.49595084127795097
-1 -0.20973639440915393
1 0.9624887761485283
-1 -0.7737048694343109
-1 -0.6042945382563452
1 0.8374129697887291
1 0.6089241379447554
1 -0.8838002809866954
-1 nan
-1 -0.557171562824597
1 nan
1 0.7697563569233496
-1 nan
1 0.6325152558331484
-1 -0.9944369996129061
1 0.7648042821798824
-1 -0.07062716143373882
1 0.9330304644810148
-1 -0.3181210229985567
1 0.20985872175135567
-1 -0.15798424395181865
1 0.6171811596239543
1 nan
-1 -0.710999702050777
-1 -0.5898740365013622
1 0.24003245016892705
-1 -0.44453796649093835
1 0.02564130439114498
1 0.1052922888607788
1 0.3942004327511375
-1 -0.4235104865744188
1 nan
1 0.6939882582562966
-1 -0.6538764605227405
-1 -0.13061842049602945
1 0.4771486224352317
-1 -0.36172874813081823
-1 -0.974478056465027
-1 -0.0478417968851792
1 0.3508465907887015
1 0.4879913985341624
-1 -0.7742849003064336
1 0.08424797103072446
1 0.6833970086286876
-1 -0.9597528633376216
-1 -0.019754374975706535
1 0.2848588627527362
-1 -0.6581629410934187
-1 -0.520789352952062
-1 -0.23486643366327797
-1 -0.3313093287087001
1 0.07874202759031368
1 0.6321880377343889
-1 -0.4686036060182124
-1 nan
1 0.44573595492088725
-1 -0.7057081997733667
1 nan
1 0.4005258264903462
-1 -0.548072941177606
1 0.2505777360882073
1 0.9986252797895478
1 0.7777586747874896
-1 -0.10788641193309623
1 0.10859510832045283
-1 -0.6054948392366897
1 0.480213852501052
1 0.8798385345774526
-1 -0.8800094943902166
-1 -0.6506481329662752
-1 0.8594450511051859
-1 -0.9668328109252693
1 nan
1 0.875742630379502
-1 -0.24984465396929978
-1 -0.5484442187458467
-1 -0.007974531117210804
1 0.8981235112024246
-1 -0.16633599492157392
1 0.4425093373975377
1 0.8110145302124601
1 0.3833041760996889
1 0.44493837818032556
-1 -0.7859082633123939
-1 -0.37075197390175907
1 0.8616064810156976
1 0.9251446954302871
-1 -0.20581508249799585
-1 -0.893791958487288
1 0.21126733823220367
1 0.29180174812059634
-1 nan
1 0.6853530894008075
1 0.6236261756264545
-1 -0.7879195338028648
1 nan
1 0.6012081979272932
1 0.6457574403064903
1 0.8907655034982944
1 nan
1 0.14437093567933545
1 0.5372193122794062
1 0.6072170593000252
-1 -0.6200026010013497
-1 -0.7106555702556732
-1 -0.423559039211709
1 0.5927683193495656
1 0.7392524150728563
1 0.9052897601095147
-1 -0.9068243108705913
1 0.9441258401788046
1 0.5183790850269994
-1 -0.453129870582506
1 0.6786314361712336
1 0.29878599046561494
-1 -0.10732758019707034
-1 -0.9746696444033227
1 nan
-1 -0.34217189081689336
-1 -0.5628431839486201
1 -0.5266811100956295
-1 0.5287341353783173
1 0.38390364152189704
-1 0.3281910060357407
-1 -0.8441938512667562
-1 -0.040652525865830125
-1 -0.08145865826987508
-1 -0.961861728086016
1 0.4081356681690378
-1 -0.29884233438188534
1 0.2632066136450246
1 nan
-1 -0.9102534565342106
1 0.35050619404078653
1 0.9432126775469001
-1 -0.7076518483575069
1 nan
1 0.2768789210728557
-1 -0.6614965597094429
-1 -0.6808788681031606
1 -0.800464028086127
1 0.5581183210501472
-1 -0.9096174377686501
1 0.7700284778467608
-1 -0.2695267278247342
1 nan
-1 -0.6419659583055102
-1 -0.698400959185258
1 0.6343388192665067
1 0.9151814655248269
-1 -0.7184929052887523
1 0.2521373890927361
-1 -0.10017932856547951
1 0.3637478393140334
-1 -0.922200807647126
-1 -0.8057360150641972
-1 -0.6770177693527186
1 nan
-1 -0.8392602357228076
-1 -0.11550838701724353
1 0.14209448876812214
1 0.062270601969316886
1 0.96464351136895
1 0.4259436836872692
1 nan
1 0.1929213305172197
-1 -0.7986259352327845
-1 -0.4650784770751777
-1 -0.0427685644055702
1 0.8892483646579676
-1 -0.04832857974056215
1 0.34400601608310244
-1 -0.5011232294488308
1 0.2012847930820414
-1 -0.26955628809137644
-1 -0.42220376818033434
-1 -0.39875932680795967
-1 -0.08405002374414994
-1 -0.20622626389274723
-1 nan
1 0.6763208921823598
1 0.6823299069021858
1 0.9455628238086302
-1 -0.33013771692033456
1 -0.7868934110316566
1 0.9880638472255843
1 0.009171871541374221
1 0.16670757302464767
1 0.9758669927701147
1 0.41926160493142106
1 0.42618604682766814
-1 -0.7499433405146065
-1 -0.9302847303191044
-1 -0.21688977037303614
1 0.8169605381431686
1 0.3993842661282341
-1 -0.08409786936325814
1 0.8031171718549768
-1 -0.09345578066091997
1 0.04975416849751957
-1 -0.3540889434267209
1 0.7986231366992846
-1 -0.678305007267997
1 0.5574318168038774
-1 -0.05669209529935437
-1 -0.45657476470640357
-1 -0.2547777533164075
1 0.5873315841159445
-1 -0.6295498512056701
1 -0.11093934554207929
1 0.4450147993645497
1 0.09277529469256063
-1 -0.3630697018413922
-1 nan
-1 nan
1 -0.26696474128295034
1 0.32011164079010523
-1 -0.3060585501366453
-1 -0.5845298700946393
1 0.038723401335824414
1 0.899464142687959
-1 -0.6813685829644707
-1 0.5199427468803217
-1 0.28025329006971056
1 -0.036525399984175255
-1 -0.5044130052406524
1 0.6751925944017294
1 0.03302829353805126
-1 -0.7364206987112347
1 0.2277074088429416
1 0.0017229660513049527
1 0.8337634813709276
-1 -0.7089897612586331
1 0.9886133534038826
1 0.3605500764784244
-1 -0.19869641619942713
1 0.9010093013033811
-1 -0.5066818929016212
-1 -0.41701438829426474
1 0.8209761018841482
1 0.1517055441788968
1 0.09859391332005951
-1 -0.7837938187381923
-1 -0.24349125663113314
-1 -0.2238008264121203
1 -0.9346763282361101
-1 -0.9287706416967869
-1 -0.11278927659453486
1 0.07407283419924826
1 -0.5286314692089662
1 0.2047607622990053
1 0.12126183605218999
1 0.5266088401864901
1 0.6021333990361517
1 -0.06850555224685029
-1 -0.6933299125774648
-1 -0.6557705399826284
1 0.05587506682109966
-1 -0.29391857738110194
1 0.5592652292193807
-1 nan
-1 -0.23834727499473707
1 -0.3296960969274625
-1 -0.9405090184051006
1 0.07526262811175655
-1 -0.26082785656243934
-1 -0.2755551503770568
-1 -0.25017809456413964
-1 -0.7660830754233772
1 0.5264644504155127
-1 -0.8945938887874789
-1 -0.8669361448884454
-1 -0.5471030759895374
1 0.7252667638238457
-1 -0.7498255665250262
-1 -0.9547999076475926
1 0.2513844538954566
1 nan
1 0.3318036173938539
1 0.6687454661539458
-1 0.6232967286893238
1 0.9352383351870632
1 0.2764701550741204
-1 -0.4342053631589462
1 -0.3148397175110049
-1 -0.41697159126634875
-1 -0.31462084571816673
-1 -0.44284058993835207
-1 -0.6049182008848857
1 0.41184459666647344
1 0.3457776342042673
1 0.3605463051807083
-1 -0.838699452874311
-1 -0.6939319972134652
-1 nan
-1 -0.7002525411264007
1 0.9424170322507399
1 0.6939411786841236
1 0.11832579308029567
-1 -0.5103436539205264
-1 -0.9601928797913686
-1 -0.0285876949221624
-1 -0.24540182154230084
-1 -0.8553684393879424
1 0.36109858894594504
-1 -0.0775072075613159
-1 -0.053236866365973246
1 0.42812498448239933
1 0.27128043935655355
1 -0.39738317200838247
1 0.13864432166009122
-1 -0.2172209322599159
-1 -0.8250962655218219
-1 -0.1579199518913328
1 0.7411106815620665
-1 -0.977336028854839
-1 -0.20549395630777378
1 0.08651330638782806
-1 0.42563948787854944
-1 nan
-1 -0.9379266931090076
-1 -0.07509137215927697
1 0.12670189437705148
-1 -0.40034672619170864
1 0.684070092834195
-1 -0.6619490949076747
-1 -0.20387603372961194
1 0.5263173985669063
1 0.07870259498400123
1 0.9964782376725727
-1 -0.26472696900724957
-1 -0.33983319885564733
-1 -0.5775526964846402
1 0.4239231104792891
1 0.13022052368757508
-1 -0.2754354904395171
-1 -0.8592626006645299
1 nan
1 0.8686454407160771
1 0.8577378792863799
1 0.6810669442448967
-1 0.18383241503671477
-1 -0.471668467070685
-1 -0.4544870198396018
1 0.09688006507766533
1 0.3769866071267953
1 0.8519550607450801
1 nan
-1 -0.45485054132438907
1 0.3847178141757617
-1 -0.7750476254004268
1 0.13231091888278845
1 0.37667908411371887
-1 -0.009100974997733546
1 0.22541852963227216
-1 -0.7977161203054037
1 0.6423834796367711
-1 -0.7148576579617956
-1 -0.7942218567989379
-1 -0.21135987453626215
-1 -0.7479673601650825
-1 -0.6582994649521279
1 0.4724531147890789
-1 -0.8335347020949146
1 -0.8948451182347168
1 0.5433645837420471
1 0.9910791106537016
-1 -0.9383758069385932
-1 -0.8156317750484599
-1 -0.6537447657159672
1 0.6364430550422926
1 0.03490411951079131
-1 -0.042429133086627546
-1 -0.18791817772781338
-1 -0.7380379965860642
-1 -0.3204284084331934
-1 -0.9215545744499631
1 0.3532174751904673
-1 0.06561638847568085
1 0.11336002531915468
-1 -0.5930735057619303
-1 0.7917972387985994
-1 -0.07674183092798548
-1 -0.618887901912506
1 0.49616837567181227
-1 -0.3316209918295434
1 0.899391142490368
1 0.836452961367735
1 0.633378270168165
-1 0.22538783943331264
-1 -0.8631359383164678
-1 nan
-1 -0.8935103569645941
-1 -0.16928649219390968
1 0.22550358552385052
-1 -0.995347565730363
1 0.6520985698933528
1 0.6096934127538578
-1 -0.8611323994948854
1 0.8266398701411297
1 0.9618627122241616
-1 -0.2326479238022412
1 nan
1 0.02015780983788873
1 0.012277089586724133
-1 0.17133292508390752
-1 -0.27221664395900724
-1 -0.2914813855832865
1 0.5157856472414555
-1 nan
1 0.025646832096465344
1 0.7179385706578134
-1 -0.27087002147149875
-1 nan
-1 -0.6593257499599445
-1 -0.13892129083627136
1 0.060886021271078006
-1 -0.10921101713297698
1 0.4666819896362946
-1 -0.2612850595732026
1 0.09950756861571652
-1 0.3723681468629134
1 0.3077784676030473
-1 -0.8160655672277515
1 0.9607905265723986
-1 -0.4370882497672508
-1 -0.620387686679327
1 0.580365866047077
-1 -0.08376382682040018
1 0.40900585456270755
-1 -0.15492459902389077
1 0.6711394364255474
-1 0.7628012955668297
-1 -0.7702588741070531
1 0.9637787653827223
-1 -0.1956124231752856
-1 -0.28229655227495876
1 0.7894387210525795
-1 -0.1310124613713053
1 -0.3047828796051879
1 0.9268766743267163
-1 -0.5200466984658174
1 0.604583257894179
-1 -0.7652059647258231
-1 -0.8012666200790037
-1 -0.5388576704806214
-1 -0.8066789409774022
-1 -0.23325695877965158
1 0.24611510851785323
-1 -0.5335659706425517
-1 -0.21627608494661543
-1 -0.7769164236864199
1 0.06566983798889181
1 nan
1 0.6888313443114895
1 0.09514997003406034
1 nan
-1 -0.7978920343380627
-1 -0.981452730136319
-1 -0.6101342674333234
-1 -0.6181284012779442
-1 -0.8621399014805984
1 0.07139647289139472
-1 -0.7297812547892368
-1 -0.04375812081600161
1 0.30532125767051976
1 0.3405113805387887
1 0.8242784027251893
1 0.48944412676604254
-1 -0.6240083490366293
1 0.7273070552037912
-1 nan
1 0.7726754072116815
-1 -0.6612905267644402
1 0.31477859339790415
-1 -0.8594448095495704
1 0.31370742296619714
-1 -0.7581145184249651
1 0.3378233773000203
-1 -0.5576835957347135
1 0.44776435188829034
1 0.5723855969102309
-1 -0.028368212878292054
-1 -0.3879253281559729
-1 -0.9419276912116834
-1 -0.5188720533339257
-1 0.09112832873885801
-1 -0.811331823641096
1 0.4918366497412241
1 0.8846537429854526
-1 -0.29053657334744876
-1 -0.5654351599552327
1 0.7766132589495456
1 0.16318102973341042
-1 -0.32405382868940924
-1 -0.7672770027263163
-1 nan
-1 -0.08236962392790748
-1 0.3006836517944933
1 0.7436495889479056
-1 0.7076046107096319
-1 0.23606696894196721
1 0.2989009528332307
-1 -0.8475503585327038
1 0.5814109224667037
1 0.28471231458108837
1 0.12345690686052091
-1 -0.512323991059541
1 -0.470137273037758
-1 -0.27016594019840623
1 0.7994165439673615
-1 -0.3095774888295668
1 0.39358381560951594
-1 nan
-1 -0.5609758394093503
1 0.9067854787209106
1 0.9747734444357004
1 0.8642421358901804
1 0.5024344821370794
-1 -0.47357298867503417
-1 -0.1503344742826893
-1 -0.5649315216142099
-1 -0.4202711797501215
-1 -0.3420235948855077
1 0.4080836509458077
-1 -0.07301022251817457
1 0.9694715877652225
-1 -0.84996349539188
-1 -0.43338137608766436
-1 nan
-1 -0.6575529865573855
-1 -0.1630603096188148
1 0.05803307394280166
1 0.439028560172283
-1 -0.2194093171660907
-1 -0.9153620278910648
-1 -0.7328741223752848
-1 -0.802383029090044
-1 -0.3583350913237031
-1 -0.09046827410300717
1 0.6493587197748607
1 0.8615716448934918
1 0.3455483117842555
-1 -0.3072374589202511
-1 -0.7878754568964832
1 0.7645886367466683
1 0.22951816446024775
-1 -0.7533444543119232
1 0.7717975438033109
1 0.04208655536565331
-1 nan
-1 -0.512959592127638
-1 -0.05529298241615921
1 -0.17560362509080019
-1 -0.5612171461803246
1 0.3833451552743148
-1 -0.3690909563299716
-1 nan
1 nan
-1 -0.9570442854661663
1 0.9284823710386494
1 0.6945126359121494
-1 -0.6087418609489328
-1 -0.8905627722849772
-1 -0.9643558020035072
1 -0.23073514179249677
-1 -0.7122051163987986
-1 -0.5792743790737058
1 0.45568031092720007
-1 -0.9380385371127467
1 0.7738571969261696
-1 -0.4606154183837081
1 0.045028519948905776
-1 -0.19544531889595262
1 0.787781858081926
1 0.7336185489528104
1 0.8220680523056147
1 0.5405602038462565
-1 -0.9894931687938455
-1 -0.5241517125015347
-1 -0.3585288318712303
1 0.8173220337872045
-1 -0.10381631580806006
-1 -0.4562594787053116
1 -0.6325674219715278
-1 -0.49563624029243214
-1 -0.15809626467241844
-1 -0.6880541347598113
-1 -0.6569117180892017
1 0.5055753492293882
1 0.6469752535498048
-1 -0.15853808806061664
-1 -0.8366592631224752
-1 -0.836606022601035
1 0.5396201611196147
1 0.7155770022374752
1 0.5211312798172683
1 0.13651216971904878
-1 -0.024911974588230912
1 0.8867498413558075
-1 -0.5673810865174755
-1 0.34823598513057363
1 0.14773239803480243
-1 -0.20216681959292626
-1 -0.7636399787819848
1 0.5433574578841345
-1 -0.4519633479958527
-1 -0.5935136739412872
1 0.2901283198638567
-1 -0.5295597892272523
1 0.0021206731532519285
1 0.740258768468852
1 0.22405824479285874
-1 -0.008076041122059507
-1 -0.2893477104738824
-1 -0.5375399852984417
1 0.9624802067625371
-1 -0.3952107763604522
-1 -0.36382475098766687
1 nan
-1 nan
1 0.4990291594649483
1 0.7941401463478015
1 0.6695658075336048
-1 -0.8770224451112332
-1 -0.21000127365707022
1 0.7750634506710117
1 0.6828498513532149
1 nan
1 0.42557418356928545
1 0.8656962217072348
-1 nan
1 0.45399981215595275
1 0.16426075390038442
-1 -0.9390701725061648
1 0.5248923679397819
1 0.44972046487420103
1 0.8885974420151461
-1 -0.5718154784591114
1 0.9943765768095774
1 0.021490351356951765
1 -0.2359207795198477
1 0.46389601286334603
1 0.15541867697000322
-1 -0.8478444452995362
-1 -0.814487140250781
1 -0.029704655699001048
-1 -0.618494897410331
-1 -0.48492732128139004
1 0.31403107079670844
-1 -0.5306943035881753
1 0.9596311153301575
-1 -0.6745450124869796
-1 -0.4859378011066253
-1 nan
-1 -0.6686848584167837
1 0.012259513976719871
1 0.05722900321479729
-1 -0.21019822889139528
-1 -0.28732359384415274
1 0.44764157564632034
1 0.16620773323080362
-1 -0.795092356200112
-1 -0.17682521453576516
-1 -0.07422357341243635
-1 nan
-1 -0.7292805778936797
-1 -0.4625679958408375
1 0.8218607918148089
1 0.5866206444808848
-1 -0.8483687289814523
1 0.10075429180273376
-1 -0.573644079814823
-1 nan
-1 -0.274128263001868
1 0.7061929585972515
-1 -0.44394491553253324
-1 -0.7376885294483464
-1 -0.9192039849832778
-1 0.29269816006148774
1 0.36993229058274757
-1 -0.44860996544048803
-1 -0.9245316458731456
1 0.8147379564089423
-1 -0.3107209168445557
-1 -0.8160653936457385
1 0.5594114735084983
-1 -0.04332391226491161
-1 -0.9058507127431883
1 0.20677368169542976
-1 -0.9343915454853144
-1 nan
-1 -0.0846383717581114
1 0.04920675200454627
-1 -0.6666149583786005
-1 -0.7575484797571304
-1 -0.17867847295964512
-1 -0.6457298308879411
1 0.44113442476836995
-1 -0.21641022906500806
-1 -0.7432127139150815
-1 -0.3151443666956424
1 0.9243763650164039
-1 -0.8970500954877549
1 nan
1 0.3172698510383727
-1 -0.4866645157845817
1 nan
1 0.33752785996037327
1 0.8575772132088366
1 0.1732034366036903
1 0.7934040496758283
1 0.524323801561847
-1 -0.48227961956905663
-1 -0.3291749050570316
1 0.09426452600195168
-1 -0.018303460650407777
-1 -0.12864382035249333
-1 -0.7786969760946496
1 0.44333891092455113
-1 -0.19062419891019178
-1 -0.20768728100760958
1 0.9962248810846899
-1 -0.7154911264894033
1 0.8496417821870497
-1 0.4025257946321361
-1 -0.5248882508103574
-1 -0.3097825351248358
1 0.7357672178241381
1 0.6019440732200099
-1 -0.8906542090379257
1 0.6645052685342503
-1 -0.36775355611516947
1 0.46567807720174414
1 0.016510791417556847
1 0.4373208336095171
1 0.9205018881711444
-1 -0.41128430157819307
-1 -0.4681874440040783
-1 -0.78625157163449
-1 -0.28590436980708134
-1 -0.4451340733943383
-1 -0.09457204612104553
-1 -0.09642262420213976
1 0.15201957465276306
-1 -0.18686278543859314
1 0.7795519389480268
1 0.5335934482109599
1 -0.3970063342781247
-1 -0.013929812871429803
1 0.4102669931110208
-1 0.6827166619135698
-1 -0.9175867187943709
-1 -0.27083852490824567
1 0.8834737511364461
-1 -0.9447099541404516
1 -0.5750435167333106
1 0.20141446913454275
1 0.49741509104270065
1 0.09006141117036126
1 0.42365196382006176
1 0.7519518191192769
1 0.693879391303249
-1 -0.2926643958972841
-1 -0.8689855854985167
-1 -0.029206080659083478
-1 -0.8029080261737236
-1 -0.04705103589254844
-1 -0.8890026783713227
1 0.12302559179695516
-1 -0.671660746507132
-1 -0.4169045276629464
1 0.2985301087250056
-1 -0.5162244296987397
-1 -0.7102919298480059
-1 0.12576204468259622
-1 -0.9373864690350011
-1 -0.27360394656936804
-1 -0.7296347153273997
-1 -0.6544730958395228
-1 -0.550876673557966
-1 -0.3841282121296834
-1 -0.28919188866843126
-1 -0.42957691375872886
-1 -0.6067839122438807
-1 -0.14003055141363752
1 0.6458496079741303
-1 -0.5220005520775028
1 0.7844228491881686
-1 -0.5096993513720873
-1 -0.6801600044359077
-1 -0.030552771236234122
-1 -0.586500680798689
-1 -0.4281126623856051
1 0.9935610634488141
-1 -0.7425174231278191
1 0.07731331242458417
1 0.8402636786985829
-1 -0.17555524936060318
-1 -0.33027801310976934
1 0.8278713578557295
-1 -0.00784276578813703
1 0.7759203735740938
-1 -0.03698670172686769
1 0.7971123321514717
-1 -0.20360404927415532
-1 0.2453734008807429
1 nan
-1 -0.2659018698587552
1 -0.3454934764066957
1 0.3893218680182964
-1 -0.6972414665028732
-1 -0.7623376698681199
1 -0.6796614464701554
-1 -0.9269986861615691
-1 -0.4531781138734001
-1 -0.4014223856246546
1 0.16224739372578711
-1 -0.8874754564429341
1 0.9122159955632634
1 0.7311624094425608
1 nan
1 0.40153746193086626
-1 -0.9360454174214554
1 0.24508955445165093
1 0.7802177943865927
1 0.28994056822909187
1 0.6778916156648787
-1 -0.14415613388735604
1 0.36867668803945386
1 0.41414524240745343
1 0.5625491482860974
-1 -0.551347272095231
-1 -0.6319021918774324
1 0.7133789017347565
1 0.7276919168036813
1 0.7705455479003542
-1 -0.5201423788671751
1 0.8720458732636998
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Mon 23 May 2011 16:23:05 CEST
"""A set of utilities to load score files with different formats.
"""
import logging
import numpy
LOGGER = logging.getLogger('bob.measure')
def split(filename):
"""split(filename) -> negatives, positives
Loads the scores from the given file and splits them into positive
and negative arrays. The file must be a two columns file where the first
column contains -1 or 1 (for negative or positive respectively) and the
second the corresponding scores.
Parameters
----------
filename: :py:class:`str`, ``file-like``:
The file object that will be opened with :py:func:`open_file` containing
the scores.
Returns
-------
negatives: 1D :py:class:`numpy.ndarray` of type float
This array contains the list of negative scores
positives: 1D :py:class:`numpy.ndarray` of type float
This array contains the list of positive scores
"""
try:
columns = numpy.loadtxt(filename)
neg_pos = columns[:, 0]
scores = columns[:, 0]
except:
LOGGER.error('''Cannot read {}. This file must be a two columns file with
the first column containing -1 or 1 (i.e. negative or
positive) and the second the scores
(float).'''.format(filename))
return None, None
return (scores[numpy.where(neg_pos == -1)],
scores[numpy.where(neg_pos == 1)])
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Wed 11 Dec 15:14:08 2013 CET
#
# Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland
"""Tests the IO functionality of bob.measure."""
from nose.tools import assert_equal
import bob.measure.load
import bob.io.base.test_utils
def test_split():
# This function test loading for generic bob.measure input files
# Read test file
test_file = bob.io.base.test_utils.datafile(
'data.txt', 'bob.measure')
neg, pos = bob.measure.load.split(test_file)
assert neg is not None
assert_equal(len(neg), 521)
assert_equal(len(pos), 479)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment