diff --git a/data/boat.csv b/data/boat.csv index b329a62..0f07ebf 100644 --- a/data/boat.csv +++ b/data/boat.csv @@ -1,100 +1,100 @@ -0.000000000000000000e+00,1.000000000000000000e+00,-1.528821945190429688e+00,9.044460058212280273e-01 -1.000000000000000000e+00,1.000000000000000000e+00,-2.036158084869384766e+00,-4.268300160765647888e-02 -2.000000000000000000e+00,1.000000000000000000e+00,-1.446954965591430664e+00,5.854420065879821777e-01 -3.000000000000000000e+00,1.000000000000000000e+00,-2.102005958557128906e+00,3.485429883003234863e-01 -4.000000000000000000e+00,1.000000000000000000e+00,-6.457939743995666504e-01,-3.123669922351837158e-01 -5.000000000000000000e+00,1.000000000000000000e+00,-1.311014056205749512e+00,2.309740036725997925e-01 -6.000000000000000000e+00,1.000000000000000000e+00,-7.009739875793457031e-01,3.855150043964385986e-01 -7.000000000000000000e+00,1.000000000000000000e+00,-1.620692968368530273e+00,4.020459949970245361e-01 -8.000000000000000000e+00,1.000000000000000000e+00,-1.280570030212402344e+00,-4.002290070056915283e-01 -9.000000000000000000e+00,1.000000000000000000e+00,-1.916879057884216309e+00,-8.051069974899291992e-01 -1.000000000000000000e+01,1.000000000000000000e+00,-1.705103993415832520e+00,-3.333750069141387939e-01 -1.100000000000000000e+01,1.000000000000000000e+00,-2.488229990005493164e+00,1.488360017538070679e-01 -1.200000000000000000e+01,1.000000000000000000e+00,-1.012195944786071777e+00,6.136620044708251953e-01 -1.300000000000000000e+01,1.000000000000000000e+00,-1.224858999252319336e+00,-4.974569976329803467e-01 -1.400000000000000000e+01,1.000000000000000000e+00,-2.211359024047851562e+00,3.031019866466522217e-01 -1.500000000000000000e+01,1.000000000000000000e+00,-6.395059823989868164e-01,-3.801169991493225098e-01 -1.600000000000000000e+01,1.000000000000000000e+00,-1.962365984916687012e+00,7.290200144052505493e-02 -1.700000000000000000e+01,1.000000000000000000e+00,-2.173443078994750977e+00,-5.780240297317504883e-01 -1.800000000000000000e+01,1.000000000000000000e+00,-2.066375970840454102e+00,3.035799860954284668e-01 -1.900000000000000000e+01,1.000000000000000000e+00,-1.165135979652404785e+00,-3.781329989433288574e-01 -2.000000000000000000e+01,1.000000000000000000e+00,-1.886734008789062500e+00,4.413599967956542969e-01 -2.100000000000000000e+01,1.000000000000000000e+00,-2.227478981018066406e+00,2.339909970760345459e-01 -2.200000000000000000e+01,1.000000000000000000e+00,-1.962036967277526855e+00,-5.586720108985900879e-01 -2.300000000000000000e+01,1.000000000000000000e+00,-1.074198007583618164e+00,9.799300134181976318e-02 -2.400000000000000000e+01,1.000000000000000000e+00,-6.173030138015747070e-01,-3.402700126171112061e-01 -2.500000000000000000e+01,1.000000000000000000e+00,-1.091027021408081055e+00,8.868510127067565918e-01 -2.600000000000000000e+01,1.000000000000000000e+00,-1.336810946464538574e+00,7.603080272674560547e-01 -2.700000000000000000e+01,1.000000000000000000e+00,-1.000777006149291992e+00,-2.407650053501129150e-01 -2.800000000000000000e+01,1.000000000000000000e+00,-1.048877000808715820e+00,-6.744040250778198242e-01 -2.900000000000000000e+01,1.000000000000000000e+00,-9.476150274276733398e-01,2.265910059213638306e-01 -3.000000000000000000e+01,1.000000000000000000e+00,-5.829480290412902832e-01,3.597170114517211914e-01 -3.100000000000000000e+01,1.000000000000000000e+00,-2.390062093734741211e+00,1.996829956769943237e-01 -3.200000000000000000e+01,1.000000000000000000e+00,-1.713708043098449707e+00,-5.692679882049560547e-01 -3.300000000000000000e+01,2.000000000000000000e+00,1.264798998832702637e+00,-8.464919924736022949e-01 -3.400000000000000000e+01,2.000000000000000000e+00,9.148470163345336914e-01,5.775660276412963867e-01 -3.500000000000000000e+01,2.000000000000000000e+00,9.355750083923339844e-01,7.558829784393310547e-01 -3.600000000000000000e+01,2.000000000000000000e+00,1.605083942413330078e+00,4.442799985408782959e-01 -3.700000000000000000e+01,2.000000000000000000e+00,2.836901903152465820e+00,-6.886640191078186035e-01 -3.800000000000000000e+01,2.000000000000000000e+00,1.225911021232604980e+00,-3.732050061225891113e-01 -3.900000000000000000e+01,2.000000000000000000e+00,9.587630033493041992e-01,-2.847500145435333252e-01 -4.000000000000000000e+01,2.000000000000000000e+00,9.543809890747070312e-01,5.873339772224426270e-01 -4.100000000000000000e+01,2.000000000000000000e+00,2.898461103439331055e+00,-7.795230150222778320e-01 -4.200000000000000000e+01,2.000000000000000000e+00,2.145201921463012695e+00,-7.348560094833374023e-01 -4.300000000000000000e+01,2.000000000000000000e+00,1.520059943199157715e+00,-7.304250001907348633e-01 -4.400000000000000000e+01,2.000000000000000000e+00,1.346652984619140625e+00,-2.069060057401657104e-01 -4.500000000000000000e+01,2.000000000000000000e+00,1.170287013053894043e+00,-5.178830027580261230e-01 -4.600000000000000000e+01,2.000000000000000000e+00,2.755032062530517578e+00,-2.177979946136474609e-01 -4.700000000000000000e+01,2.000000000000000000e+00,1.922526001930236816e+00,-8.142079710960388184e-01 -4.800000000000000000e+01,2.000000000000000000e+00,9.433979988098144531e-01,-6.809300184249877930e-01 -4.900000000000000000e+01,2.000000000000000000e+00,2.589031934738159180e+00,7.583069801330566406e-01 -5.000000000000000000e+01,2.000000000000000000e+00,1.273978948593139648e+00,9.826099872589111328e-01 -5.100000000000000000e+01,2.000000000000000000e+00,2.324059963226318359e+00,7.427290081977844238e-01 -5.200000000000000000e+01,2.000000000000000000e+00,1.859261989593505859e+00,-7.989999838173389435e-03 -5.300000000000000000e+01,2.000000000000000000e+00,1.475064039230346680e+00,-8.781170248985290527e-01 -5.400000000000000000e+01,2.000000000000000000e+00,1.424934983253479004e+00,-6.274780035018920898e-01 -5.500000000000000000e+01,2.000000000000000000e+00,2.734179973602294922e+00,-7.534430027008056641e-01 -5.600000000000000000e+01,2.000000000000000000e+00,9.268910288810729980e-01,-2.606190145015716553e-01 -5.700000000000000000e+01,2.000000000000000000e+00,2.297281980514526367e+00,7.786939740180969238e-01 -5.800000000000000000e+01,2.000000000000000000e+00,2.087541103363037109e+00,-6.866179704666137695e-01 -5.900000000000000000e+01,2.000000000000000000e+00,1.533378958702087402e+00,-5.332090258598327637e-01 -6.000000000000000000e+01,2.000000000000000000e+00,9.168440103530883789e-01,-2.061920017004013062e-01 -6.100000000000000000e+01,2.000000000000000000e+00,2.199736118316650391e+00,-8.299990296363830566e-01 -6.200000000000000000e+01,2.000000000000000000e+00,2.437618970870971680e+00,9.394029974937438965e-01 -6.300000000000000000e+01,2.000000000000000000e+00,2.329593896865844727e+00,5.639240145683288574e-01 -6.400000000000000000e+01,2.000000000000000000e+00,1.375130057334899902e+00,-6.085379719734191895e-01 -6.500000000000000000e+01,2.000000000000000000e+00,1.426427960395812988e+00,4.275699853897094727e-01 -6.600000000000000000e+01,3.000000000000000000e+00,4.775997161865234375e+00,7.011100053787231445e-01 -6.700000000000000000e+01,3.000000000000000000e+00,3.480571985244750977e+00,1.569522976875305176e+00 -6.800000000000000000e+01,3.000000000000000000e+00,1.709825992584228516e+00,2.073519945144653320e+00 -6.900000000000000000e+01,3.000000000000000000e+00,-1.307500004768371582e-01,2.127629995346069336e+00 -7.000000000000000000e+01,3.000000000000000000e+00,-1.936506032943725586e+00,1.915510058403015137e+00 -7.100000000000000000e+01,3.000000000000000000e+00,4.381993770599365234e+00,-9.449740052223205566e-01 -7.200000000000000000e+01,3.000000000000000000e+00,1.738340973854064941e+00,1.919551014900207520e+00 -7.300000000000000000e+01,3.000000000000000000e+00,2.250093936920166016e+00,-1.593212962150573730e+00 -7.400000000000000000e+01,3.000000000000000000e+00,-2.923434019088745117e+00,-1.494874000549316406e+00 -7.500000000000000000e+01,3.000000000000000000e+00,-4.997717857360839844e+00,-5.394999869167804718e-03 -7.600000000000000000e+01,3.000000000000000000e+00,-4.554725170135498047e+00,-7.430559992790222168e-01 -7.700000000000000000e+01,3.000000000000000000e+00,3.168922901153564453e+00,1.551530003547668457e+00 -7.800000000000000000e+01,3.000000000000000000e+00,2.271770000457763672e+00,1.927363038063049316e+00 -7.900000000000000000e+01,3.000000000000000000e+00,4.550985813140869141e+00,9.768109917640686035e-01 -8.000000000000000000e+01,3.000000000000000000e+00,-1.550340056419372559e+00,1.970878005027770996e+00 -8.100000000000000000e+01,3.000000000000000000e+00,-4.405232906341552734e+00,1.137701988220214844e+00 -8.200000000000000000e+01,3.000000000000000000e+00,-3.431651115417480469e+00,-1.435773015022277832e+00 -8.300000000000000000e+01,3.000000000000000000e+00,-5.005350112915039062e-01,2.068276882171630859e+00 -8.400000000000000000e+01,3.000000000000000000e+00,-2.472163915634155273e+00,-1.589836001396179199e+00 -8.500000000000000000e+01,3.000000000000000000e+00,1.508319973945617676e+00,2.073388099670410156e+00 -8.600000000000000000e+01,3.000000000000000000e+00,-3.002209961414337158e-01,2.008028984069824219e+00 -8.700000000000000000e+01,3.000000000000000000e+00,4.218739867210388184e-01,-1.820250988006591797e+00 -8.800000000000000000e+01,3.000000000000000000e+00,3.551970005035400391e+00,-1.250223994255065918e+00 -8.900000000000000000e+01,3.000000000000000000e+00,1.559821009635925293e+00,-1.873939990997314453e+00 -9.000000000000000000e+01,3.000000000000000000e+00,-5.125200003385543823e-02,-1.954408049583435059e+00 -9.100000000000000000e+01,3.000000000000000000e+00,-1.721169948577880859e+00,1.940513968467712402e+00 -9.200000000000000000e+01,3.000000000000000000e+00,-2.483239889144897461e+00,-1.567427992820739746e+00 -9.300000000000000000e+01,3.000000000000000000e+00,-3.155109882354736328e+00,1.641978025436401367e+00 -9.400000000000000000e+01,3.000000000000000000e+00,-1.744156002998352051e+00,-1.697075009346008301e+00 -9.500000000000000000e+01,3.000000000000000000e+00,2.612607955932617188e+00,1.796733021736145020e+00 -9.600000000000000000e+01,3.000000000000000000e+00,2.992022991180419922e+00,-1.589324951171875000e+00 -9.700000000000000000e+01,3.000000000000000000e+00,-1.248553037643432617e+00,-1.839836955070495605e+00 -9.800000000000000000e+01,3.000000000000000000e+00,4.694591999053955078e+00,-6.377410292625427246e-01 -9.900000000000000000e+01,3.000000000000000000e+00,8.488690257072448730e-01,2.003649950027465820e+00 +0.000000000000000000e+00,0.000000000000000000e+00,-1.528821945190429688e+00,9.044460058212280273e-01 +1.000000000000000000e+00,0.000000000000000000e+00,-2.036158084869384766e+00,-4.268300160765647888e-02 +2.000000000000000000e+00,0.000000000000000000e+00,-1.446954965591430664e+00,5.854420065879821777e-01 +3.000000000000000000e+00,0.000000000000000000e+00,-2.102005958557128906e+00,3.485429883003234863e-01 +4.000000000000000000e+00,0.000000000000000000e+00,-6.457939743995666504e-01,-3.123669922351837158e-01 +5.000000000000000000e+00,0.000000000000000000e+00,-1.311014056205749512e+00,2.309740036725997925e-01 +6.000000000000000000e+00,0.000000000000000000e+00,-7.009739875793457031e-01,3.855150043964385986e-01 +7.000000000000000000e+00,0.000000000000000000e+00,-1.620692968368530273e+00,4.020459949970245361e-01 +8.000000000000000000e+00,0.000000000000000000e+00,-1.280570030212402344e+00,-4.002290070056915283e-01 +9.000000000000000000e+00,0.000000000000000000e+00,-1.916879057884216309e+00,-8.051069974899291992e-01 +1.000000000000000000e+01,0.000000000000000000e+00,-1.705103993415832520e+00,-3.333750069141387939e-01 +1.100000000000000000e+01,0.000000000000000000e+00,-2.488229990005493164e+00,1.488360017538070679e-01 +1.200000000000000000e+01,0.000000000000000000e+00,-1.012195944786071777e+00,6.136620044708251953e-01 +1.300000000000000000e+01,0.000000000000000000e+00,-1.224858999252319336e+00,-4.974569976329803467e-01 +1.400000000000000000e+01,0.000000000000000000e+00,-2.211359024047851562e+00,3.031019866466522217e-01 +1.500000000000000000e+01,0.000000000000000000e+00,-6.395059823989868164e-01,-3.801169991493225098e-01 +1.600000000000000000e+01,0.000000000000000000e+00,-1.962365984916687012e+00,7.290200144052505493e-02 +1.700000000000000000e+01,0.000000000000000000e+00,-2.173443078994750977e+00,-5.780240297317504883e-01 +1.800000000000000000e+01,0.000000000000000000e+00,-2.066375970840454102e+00,3.035799860954284668e-01 +1.900000000000000000e+01,0.000000000000000000e+00,-1.165135979652404785e+00,-3.781329989433288574e-01 +2.000000000000000000e+01,0.000000000000000000e+00,-1.886734008789062500e+00,4.413599967956542969e-01 +2.100000000000000000e+01,0.000000000000000000e+00,-2.227478981018066406e+00,2.339909970760345459e-01 +2.200000000000000000e+01,0.000000000000000000e+00,-1.962036967277526855e+00,-5.586720108985900879e-01 +2.300000000000000000e+01,0.000000000000000000e+00,-1.074198007583618164e+00,9.799300134181976318e-02 +2.400000000000000000e+01,0.000000000000000000e+00,-6.173030138015747070e-01,-3.402700126171112061e-01 +2.500000000000000000e+01,0.000000000000000000e+00,-1.091027021408081055e+00,8.868510127067565918e-01 +2.600000000000000000e+01,0.000000000000000000e+00,-1.336810946464538574e+00,7.603080272674560547e-01 +2.700000000000000000e+01,0.000000000000000000e+00,-1.000777006149291992e+00,-2.407650053501129150e-01 +2.800000000000000000e+01,0.000000000000000000e+00,-1.048877000808715820e+00,-6.744040250778198242e-01 +2.900000000000000000e+01,0.000000000000000000e+00,-9.476150274276733398e-01,2.265910059213638306e-01 +3.000000000000000000e+01,0.000000000000000000e+00,-5.829480290412902832e-01,3.597170114517211914e-01 +3.100000000000000000e+01,0.000000000000000000e+00,-2.390062093734741211e+00,1.996829956769943237e-01 +3.200000000000000000e+01,0.000000000000000000e+00,-1.713708043098449707e+00,-5.692679882049560547e-01 +3.300000000000000000e+01,1.000000000000000000e+00,1.264798998832702637e+00,-8.464919924736022949e-01 +3.400000000000000000e+01,1.000000000000000000e+00,9.148470163345336914e-01,5.775660276412963867e-01 +3.500000000000000000e+01,1.000000000000000000e+00,9.355750083923339844e-01,7.558829784393310547e-01 +3.600000000000000000e+01,1.000000000000000000e+00,1.605083942413330078e+00,4.442799985408782959e-01 +3.700000000000000000e+01,1.000000000000000000e+00,2.836901903152465820e+00,-6.886640191078186035e-01 +3.800000000000000000e+01,1.000000000000000000e+00,1.225911021232604980e+00,-3.732050061225891113e-01 +3.900000000000000000e+01,1.000000000000000000e+00,9.587630033493041992e-01,-2.847500145435333252e-01 +4.000000000000000000e+01,1.000000000000000000e+00,9.543809890747070312e-01,5.873339772224426270e-01 +4.100000000000000000e+01,1.000000000000000000e+00,2.898461103439331055e+00,-7.795230150222778320e-01 +4.200000000000000000e+01,1.000000000000000000e+00,2.145201921463012695e+00,-7.348560094833374023e-01 +4.300000000000000000e+01,1.000000000000000000e+00,1.520059943199157715e+00,-7.304250001907348633e-01 +4.400000000000000000e+01,1.000000000000000000e+00,1.346652984619140625e+00,-2.069060057401657104e-01 +4.500000000000000000e+01,1.000000000000000000e+00,1.170287013053894043e+00,-5.178830027580261230e-01 +4.600000000000000000e+01,1.000000000000000000e+00,2.755032062530517578e+00,-2.177979946136474609e-01 +4.700000000000000000e+01,1.000000000000000000e+00,1.922526001930236816e+00,-8.142079710960388184e-01 +4.800000000000000000e+01,1.000000000000000000e+00,9.433979988098144531e-01,-6.809300184249877930e-01 +4.900000000000000000e+01,1.000000000000000000e+00,2.589031934738159180e+00,7.583069801330566406e-01 +5.000000000000000000e+01,1.000000000000000000e+00,1.273978948593139648e+00,9.826099872589111328e-01 +5.100000000000000000e+01,1.000000000000000000e+00,2.324059963226318359e+00,7.427290081977844238e-01 +5.200000000000000000e+01,1.000000000000000000e+00,1.859261989593505859e+00,-7.989999838173389435e-03 +5.300000000000000000e+01,1.000000000000000000e+00,1.475064039230346680e+00,-8.781170248985290527e-01 +5.400000000000000000e+01,1.000000000000000000e+00,1.424934983253479004e+00,-6.274780035018920898e-01 +5.500000000000000000e+01,1.000000000000000000e+00,2.734179973602294922e+00,-7.534430027008056641e-01 +5.600000000000000000e+01,1.000000000000000000e+00,9.268910288810729980e-01,-2.606190145015716553e-01 +5.700000000000000000e+01,1.000000000000000000e+00,2.297281980514526367e+00,7.786939740180969238e-01 +5.800000000000000000e+01,1.000000000000000000e+00,2.087541103363037109e+00,-6.866179704666137695e-01 +5.900000000000000000e+01,1.000000000000000000e+00,1.533378958702087402e+00,-5.332090258598327637e-01 +6.000000000000000000e+01,1.000000000000000000e+00,9.168440103530883789e-01,-2.061920017004013062e-01 +6.100000000000000000e+01,1.000000000000000000e+00,2.199736118316650391e+00,-8.299990296363830566e-01 +6.200000000000000000e+01,1.000000000000000000e+00,2.437618970870971680e+00,9.394029974937438965e-01 +6.300000000000000000e+01,1.000000000000000000e+00,2.329593896865844727e+00,5.639240145683288574e-01 +6.400000000000000000e+01,1.000000000000000000e+00,1.375130057334899902e+00,-6.085379719734191895e-01 +6.500000000000000000e+01,1.000000000000000000e+00,1.426427960395812988e+00,4.275699853897094727e-01 +6.600000000000000000e+01,2.000000000000000000e+00,4.775997161865234375e+00,7.011100053787231445e-01 +6.700000000000000000e+01,2.000000000000000000e+00,3.480571985244750977e+00,1.569522976875305176e+00 +6.800000000000000000e+01,2.000000000000000000e+00,1.709825992584228516e+00,2.073519945144653320e+00 +6.900000000000000000e+01,2.000000000000000000e+00,-1.307500004768371582e-01,2.127629995346069336e+00 +7.000000000000000000e+01,2.000000000000000000e+00,-1.936506032943725586e+00,1.915510058403015137e+00 +7.100000000000000000e+01,2.000000000000000000e+00,4.381993770599365234e+00,-9.449740052223205566e-01 +7.200000000000000000e+01,2.000000000000000000e+00,1.738340973854064941e+00,1.919551014900207520e+00 +7.300000000000000000e+01,2.000000000000000000e+00,2.250093936920166016e+00,-1.593212962150573730e+00 +7.400000000000000000e+01,2.000000000000000000e+00,-2.923434019088745117e+00,-1.494874000549316406e+00 +7.500000000000000000e+01,2.000000000000000000e+00,-4.997717857360839844e+00,-5.394999869167804718e-03 +7.600000000000000000e+01,2.000000000000000000e+00,-4.554725170135498047e+00,-7.430559992790222168e-01 +7.700000000000000000e+01,2.000000000000000000e+00,3.168922901153564453e+00,1.551530003547668457e+00 +7.800000000000000000e+01,2.000000000000000000e+00,2.271770000457763672e+00,1.927363038063049316e+00 +7.900000000000000000e+01,2.000000000000000000e+00,4.550985813140869141e+00,9.768109917640686035e-01 +8.000000000000000000e+01,2.000000000000000000e+00,-1.550340056419372559e+00,1.970878005027770996e+00 +8.100000000000000000e+01,2.000000000000000000e+00,-4.405232906341552734e+00,1.137701988220214844e+00 +8.200000000000000000e+01,2.000000000000000000e+00,-3.431651115417480469e+00,-1.435773015022277832e+00 +8.300000000000000000e+01,2.000000000000000000e+00,-5.005350112915039062e-01,2.068276882171630859e+00 +8.400000000000000000e+01,2.000000000000000000e+00,-2.472163915634155273e+00,-1.589836001396179199e+00 +8.500000000000000000e+01,2.000000000000000000e+00,1.508319973945617676e+00,2.073388099670410156e+00 +8.600000000000000000e+01,2.000000000000000000e+00,-3.002209961414337158e-01,2.008028984069824219e+00 +8.700000000000000000e+01,2.000000000000000000e+00,4.218739867210388184e-01,-1.820250988006591797e+00 +8.800000000000000000e+01,2.000000000000000000e+00,3.551970005035400391e+00,-1.250223994255065918e+00 +8.900000000000000000e+01,2.000000000000000000e+00,1.559821009635925293e+00,-1.873939990997314453e+00 +9.000000000000000000e+01,2.000000000000000000e+00,-5.125200003385543823e-02,-1.954408049583435059e+00 +9.100000000000000000e+01,2.000000000000000000e+00,-1.721169948577880859e+00,1.940513968467712402e+00 +9.200000000000000000e+01,2.000000000000000000e+00,-2.483239889144897461e+00,-1.567427992820739746e+00 +9.300000000000000000e+01,2.000000000000000000e+00,-3.155109882354736328e+00,1.641978025436401367e+00 +9.400000000000000000e+01,2.000000000000000000e+00,-1.744156002998352051e+00,-1.697075009346008301e+00 +9.500000000000000000e+01,2.000000000000000000e+00,2.612607955932617188e+00,1.796733021736145020e+00 +9.600000000000000000e+01,2.000000000000000000e+00,2.992022991180419922e+00,-1.589324951171875000e+00 +9.700000000000000000e+01,2.000000000000000000e+00,-1.248553037643432617e+00,-1.839836955070495605e+00 +9.800000000000000000e+01,2.000000000000000000e+00,4.694591999053955078e+00,-6.377410292625427246e-01 +9.900000000000000000e+01,2.000000000000000000e+00,8.488690257072448730e-01,2.003649950027465820e+00 diff --git a/data/boat.json b/data/boat.json index 5de5ce7..51050a9 100644 --- a/data/boat.json +++ b/data/boat.json @@ -1 +1 @@ -{"data": [{"id": 0, "label": 1, "features": [-1.5288219451904297, 0.904446005821228]}, {"id": 1, "label": 1, "features": [-2.0361580848693848, -0.04268300160765648]}, {"id": 2, "label": 1, "features": [-1.4469549655914307, 0.5854420065879822]}, {"id": 3, "label": 1, "features": [-2.102005958557129, 0.3485429883003235]}, {"id": 4, "label": 1, "features": [-0.6457939743995667, -0.3123669922351837]}, {"id": 5, "label": 1, "features": [-1.3110140562057495, 0.2309740036725998]}, {"id": 6, "label": 1, "features": [-0.7009739875793457, 0.3855150043964386]}, {"id": 7, "label": 1, "features": [-1.6206929683685303, 0.40204599499702454]}, {"id": 8, "label": 1, "features": [-1.2805700302124023, -0.40022900700569153]}, {"id": 9, "label": 1, "features": [-1.9168790578842163, -0.8051069974899292]}, {"id": 10, "label": 1, "features": [-1.7051039934158325, -0.3333750069141388]}, {"id": 11, "label": 1, "features": [-2.488229990005493, 0.14883600175380707]}, {"id": 12, "label": 1, "features": [-1.0121959447860718, 0.6136620044708252]}, {"id": 13, "label": 1, "features": [-1.2248589992523193, -0.49745699763298035]}, {"id": 14, "label": 1, "features": [-2.2113590240478516, 0.3031019866466522]}, {"id": 15, "label": 1, "features": [-0.6395059823989868, -0.3801169991493225]}, {"id": 16, "label": 1, "features": [-1.962365984916687, 0.07290200144052505]}, {"id": 17, "label": 1, "features": [-2.173443078994751, -0.5780240297317505]}, {"id": 18, "label": 1, "features": [-2.066375970840454, 0.30357998609542847]}, {"id": 19, "label": 1, "features": [-1.1651359796524048, -0.37813299894332886]}, {"id": 20, "label": 1, "features": [-1.8867340087890625, 0.4413599967956543]}, {"id": 21, "label": 1, "features": [-2.2274789810180664, 0.23399099707603455]}, {"id": 22, "label": 1, "features": [-1.9620369672775269, -0.5586720108985901]}, {"id": 23, "label": 1, "features": [-1.0741980075836182, 0.09799300134181976]}, {"id": 24, "label": 1, "features": [-0.6173030138015747, -0.3402700126171112]}, {"id": 25, "label": 1, "features": [-1.091027021408081, 0.8868510127067566]}, {"id": 26, "label": 1, "features": [-1.3368109464645386, 0.760308027267456]}, {"id": 27, "label": 1, "features": [-1.000777006149292, -0.24076500535011292]}, {"id": 28, "label": 1, "features": [-1.0488770008087158, -0.6744040250778198]}, {"id": 29, "label": 1, "features": [-0.9476150274276733, 0.22659100592136383]}, {"id": 30, "label": 1, "features": [-0.5829480290412903, 0.3597170114517212]}, {"id": 31, "label": 1, "features": [-2.390062093734741, 0.19968299567699432]}, {"id": 32, "label": 1, "features": [-1.7137080430984497, -0.569267988204956]}, {"id": 33, "label": 2, "features": [1.2647989988327026, -0.8464919924736023]}, {"id": 34, "label": 2, "features": [0.9148470163345337, 0.5775660276412964]}, {"id": 35, "label": 2, "features": [0.935575008392334, 0.755882978439331]}, {"id": 36, "label": 2, "features": [1.60508394241333, 0.4442799985408783]}, {"id": 37, "label": 2, "features": [2.836901903152466, -0.6886640191078186]}, {"id": 38, "label": 2, "features": [1.225911021232605, -0.3732050061225891]}, {"id": 39, "label": 2, "features": [0.9587630033493042, -0.2847500145435333]}, {"id": 40, "label": 2, "features": [0.954380989074707, 0.5873339772224426]}, {"id": 41, "label": 2, "features": [2.898461103439331, -0.7795230150222778]}, {"id": 42, "label": 2, "features": [2.1452019214630127, -0.7348560094833374]}, {"id": 43, "label": 2, "features": [1.5200599431991577, -0.7304250001907349]}, {"id": 44, "label": 2, "features": [1.3466529846191406, -0.2069060057401657]}, {"id": 45, "label": 2, "features": [1.170287013053894, -0.5178830027580261]}, {"id": 46, "label": 2, "features": [2.7550320625305176, -0.21779799461364746]}, {"id": 47, "label": 2, "features": [1.9225260019302368, -0.8142079710960388]}, {"id": 48, "label": 2, "features": [0.9433979988098145, -0.6809300184249878]}, {"id": 49, "label": 2, "features": [2.589031934738159, 0.7583069801330566]}, {"id": 50, "label": 2, "features": [1.2739789485931396, 0.9826099872589111]}, {"id": 51, "label": 2, "features": [2.3240599632263184, 0.7427290081977844]}, {"id": 52, "label": 2, "features": [1.8592619895935059, -0.00798999983817339]}, {"id": 53, "label": 2, "features": [1.4750640392303467, -0.878117024898529]}, {"id": 54, "label": 2, "features": [1.424934983253479, -0.6274780035018921]}, {"id": 55, "label": 2, "features": [2.734179973602295, -0.7534430027008057]}, {"id": 56, "label": 2, "features": [0.926891028881073, -0.26061901450157166]}, {"id": 57, "label": 2, "features": [2.2972819805145264, 0.7786939740180969]}, {"id": 58, "label": 2, "features": [2.087541103363037, -0.6866179704666138]}, {"id": 59, "label": 2, "features": [1.5333789587020874, -0.5332090258598328]}, {"id": 60, "label": 2, "features": [0.9168440103530884, -0.2061920017004013]}, {"id": 61, "label": 2, "features": [2.1997361183166504, -0.8299990296363831]}, {"id": 62, "label": 2, "features": [2.4376189708709717, 0.9394029974937439]}, {"id": 63, "label": 2, "features": [2.3295938968658447, 0.5639240145683289]}, {"id": 64, "label": 2, "features": [1.3751300573349, -0.6085379719734192]}, {"id": 65, "label": 2, "features": [1.426427960395813, 0.4275699853897095]}, {"id": 66, "label": 3, "features": [4.775997161865234, 0.7011100053787231]}, {"id": 67, "label": 3, "features": [3.480571985244751, 1.5695229768753052]}, {"id": 68, "label": 3, "features": [1.7098259925842285, 2.0735199451446533]}, {"id": 69, "label": 3, "features": [-0.13075000047683716, 2.1276299953460693]}, {"id": 70, "label": 3, "features": [-1.9365060329437256, 1.9155100584030151]}, {"id": 71, "label": 3, "features": [4.381993770599365, -0.9449740052223206]}, {"id": 72, "label": 3, "features": [1.738340973854065, 1.9195510149002075]}, {"id": 73, "label": 3, "features": [2.250093936920166, -1.5932129621505737]}, {"id": 74, "label": 3, "features": [-2.923434019088745, -1.4948740005493164]}, {"id": 75, "label": 3, "features": [-4.99771785736084, -0.005394999869167805]}, {"id": 76, "label": 3, "features": [-4.554725170135498, -0.7430559992790222]}, {"id": 77, "label": 3, "features": [3.1689229011535645, 1.5515300035476685]}, {"id": 78, "label": 3, "features": [2.2717700004577637, 1.9273630380630493]}, {"id": 79, "label": 3, "features": [4.550985813140869, 0.9768109917640686]}, {"id": 80, "label": 3, "features": [-1.5503400564193726, 1.970878005027771]}, {"id": 81, "label": 3, "features": [-4.405232906341553, 1.1377019882202148]}, {"id": 82, "label": 3, "features": [-3.4316511154174805, -1.4357730150222778]}, {"id": 83, "label": 3, "features": [-0.5005350112915039, 2.068276882171631]}, {"id": 84, "label": 3, "features": [-2.4721639156341553, -1.5898360013961792]}, {"id": 85, "label": 3, "features": [1.5083199739456177, 2.07338809967041]}, {"id": 86, "label": 3, "features": [-0.3002209961414337, 2.008028984069824]}, {"id": 87, "label": 3, "features": [0.4218739867210388, -1.8202509880065918]}, {"id": 88, "label": 3, "features": [3.5519700050354004, -1.250223994255066]}, {"id": 89, "label": 3, "features": [1.5598210096359253, -1.8739399909973145]}, {"id": 90, "label": 3, "features": [-0.05125200003385544, -1.954408049583435]}, {"id": 91, "label": 3, "features": [-1.7211699485778809, 1.9405139684677124]}, {"id": 92, "label": 3, "features": [-2.4832398891448975, -1.5674279928207397]}, {"id": 93, "label": 3, "features": [-3.1551098823547363, 1.6419780254364014]}, {"id": 94, "label": 3, "features": [-1.744156002998352, -1.6970750093460083]}, {"id": 95, "label": 3, "features": [2.612607955932617, 1.796733021736145]}, {"id": 96, "label": 3, "features": [2.99202299118042, -1.589324951171875]}, {"id": 97, "label": 3, "features": [-1.2485530376434326, -1.8398369550704956]}, {"id": 98, "label": 3, "features": [4.694591999053955, -0.6377410292625427]}, {"id": 99, "label": 3, "features": [0.8488690257072449, 2.003649950027466]}]} \ No newline at end of file +{"data": [{"id": 0, "label": 0, "features": [-1.5288219451904297, 0.904446005821228]}, {"id": 1, "label": 0, "features": [-2.0361580848693848, -0.04268300160765648]}, {"id": 2, "label": 0, "features": [-1.4469549655914307, 0.5854420065879822]}, {"id": 3, "label": 0, "features": [-2.102005958557129, 0.3485429883003235]}, {"id": 4, "label": 0, "features": [-0.6457939743995667, -0.3123669922351837]}, {"id": 5, "label": 0, "features": [-1.3110140562057495, 0.2309740036725998]}, {"id": 6, "label": 0, "features": [-0.7009739875793457, 0.3855150043964386]}, {"id": 7, "label": 0, "features": [-1.6206929683685303, 0.40204599499702454]}, {"id": 8, "label": 0, "features": [-1.2805700302124023, -0.40022900700569153]}, {"id": 9, "label": 0, "features": [-1.9168790578842163, -0.8051069974899292]}, {"id": 10, "label": 0, "features": [-1.7051039934158325, -0.3333750069141388]}, {"id": 11, "label": 0, "features": [-2.488229990005493, 0.14883600175380707]}, {"id": 12, "label": 0, "features": [-1.0121959447860718, 0.6136620044708252]}, {"id": 13, "label": 0, "features": [-1.2248589992523193, -0.49745699763298035]}, {"id": 14, "label": 0, "features": [-2.2113590240478516, 0.3031019866466522]}, {"id": 15, "label": 0, "features": [-0.6395059823989868, -0.3801169991493225]}, {"id": 16, "label": 0, "features": [-1.962365984916687, 0.07290200144052505]}, {"id": 17, "label": 0, "features": [-2.173443078994751, -0.5780240297317505]}, {"id": 18, "label": 0, "features": [-2.066375970840454, 0.30357998609542847]}, {"id": 19, "label": 0, "features": [-1.1651359796524048, -0.37813299894332886]}, {"id": 20, "label": 0, "features": [-1.8867340087890625, 0.4413599967956543]}, {"id": 21, "label": 0, "features": [-2.2274789810180664, 0.23399099707603455]}, {"id": 22, "label": 0, "features": [-1.9620369672775269, -0.5586720108985901]}, {"id": 23, "label": 0, "features": [-1.0741980075836182, 0.09799300134181976]}, {"id": 24, "label": 0, "features": [-0.6173030138015747, -0.3402700126171112]}, {"id": 25, "label": 0, "features": [-1.091027021408081, 0.8868510127067566]}, {"id": 26, "label": 0, "features": [-1.3368109464645386, 0.760308027267456]}, {"id": 27, "label": 0, "features": [-1.000777006149292, -0.24076500535011292]}, {"id": 28, "label": 0, "features": [-1.0488770008087158, -0.6744040250778198]}, {"id": 29, "label": 0, "features": [-0.9476150274276733, 0.22659100592136383]}, {"id": 30, "label": 0, "features": [-0.5829480290412903, 0.3597170114517212]}, {"id": 31, "label": 0, "features": [-2.390062093734741, 0.19968299567699432]}, {"id": 32, "label": 0, "features": [-1.7137080430984497, -0.569267988204956]}, {"id": 33, "label": 1, "features": [1.2647989988327026, -0.8464919924736023]}, {"id": 34, "label": 1, "features": [0.9148470163345337, 0.5775660276412964]}, {"id": 35, "label": 1, "features": [0.935575008392334, 0.755882978439331]}, {"id": 36, "label": 1, "features": [1.60508394241333, 0.4442799985408783]}, {"id": 37, "label": 1, "features": [2.836901903152466, -0.6886640191078186]}, {"id": 38, "label": 1, "features": [1.225911021232605, -0.3732050061225891]}, {"id": 39, "label": 1, "features": [0.9587630033493042, -0.2847500145435333]}, {"id": 40, "label": 1, "features": [0.954380989074707, 0.5873339772224426]}, {"id": 41, "label": 1, "features": [2.898461103439331, -0.7795230150222778]}, {"id": 42, "label": 1, "features": [2.1452019214630127, -0.7348560094833374]}, {"id": 43, "label": 1, "features": [1.5200599431991577, -0.7304250001907349]}, {"id": 44, "label": 1, "features": [1.3466529846191406, -0.2069060057401657]}, {"id": 45, "label": 1, "features": [1.170287013053894, -0.5178830027580261]}, {"id": 46, "label": 1, "features": [2.7550320625305176, -0.21779799461364746]}, {"id": 47, "label": 1, "features": [1.9225260019302368, -0.8142079710960388]}, {"id": 48, "label": 1, "features": [0.9433979988098145, -0.6809300184249878]}, {"id": 49, "label": 1, "features": [2.589031934738159, 0.7583069801330566]}, {"id": 50, "label": 1, "features": [1.2739789485931396, 0.9826099872589111]}, {"id": 51, "label": 1, "features": [2.3240599632263184, 0.7427290081977844]}, {"id": 52, "label": 1, "features": [1.8592619895935059, -0.00798999983817339]}, {"id": 53, "label": 1, "features": [1.4750640392303467, -0.878117024898529]}, {"id": 54, "label": 1, "features": [1.424934983253479, -0.6274780035018921]}, {"id": 55, "label": 1, "features": [2.734179973602295, -0.7534430027008057]}, {"id": 56, "label": 1, "features": [0.926891028881073, -0.26061901450157166]}, {"id": 57, "label": 1, "features": [2.2972819805145264, 0.7786939740180969]}, {"id": 58, "label": 1, "features": [2.087541103363037, -0.6866179704666138]}, {"id": 59, "label": 1, "features": [1.5333789587020874, -0.5332090258598328]}, {"id": 60, "label": 1, "features": [0.9168440103530884, -0.2061920017004013]}, {"id": 61, "label": 1, "features": [2.1997361183166504, -0.8299990296363831]}, {"id": 62, "label": 1, "features": [2.4376189708709717, 0.9394029974937439]}, {"id": 63, "label": 1, "features": [2.3295938968658447, 0.5639240145683289]}, {"id": 64, "label": 1, "features": [1.3751300573349, -0.6085379719734192]}, {"id": 65, "label": 1, "features": [1.426427960395813, 0.4275699853897095]}, {"id": 66, "label": 2, "features": [4.775997161865234, 0.7011100053787231]}, {"id": 67, "label": 2, "features": [3.480571985244751, 1.5695229768753052]}, {"id": 68, "label": 2, "features": [1.7098259925842285, 2.0735199451446533]}, {"id": 69, "label": 2, "features": [-0.13075000047683716, 2.1276299953460693]}, {"id": 70, "label": 2, "features": [-1.9365060329437256, 1.9155100584030151]}, {"id": 71, "label": 2, "features": [4.381993770599365, -0.9449740052223206]}, {"id": 72, "label": 2, "features": [1.738340973854065, 1.9195510149002075]}, {"id": 73, "label": 2, "features": [2.250093936920166, -1.5932129621505737]}, {"id": 74, "label": 2, "features": [-2.923434019088745, -1.4948740005493164]}, {"id": 75, "label": 2, "features": [-4.99771785736084, -0.005394999869167805]}, {"id": 76, "label": 2, "features": [-4.554725170135498, -0.7430559992790222]}, {"id": 77, "label": 2, "features": [3.1689229011535645, 1.5515300035476685]}, {"id": 78, "label": 2, "features": [2.2717700004577637, 1.9273630380630493]}, {"id": 79, "label": 2, "features": [4.550985813140869, 0.9768109917640686]}, {"id": 80, "label": 2, "features": [-1.5503400564193726, 1.970878005027771]}, {"id": 81, "label": 2, "features": [-4.405232906341553, 1.1377019882202148]}, {"id": 82, "label": 2, "features": [-3.4316511154174805, -1.4357730150222778]}, {"id": 83, "label": 2, "features": [-0.5005350112915039, 2.068276882171631]}, {"id": 84, "label": 2, "features": [-2.4721639156341553, -1.5898360013961792]}, {"id": 85, "label": 2, "features": [1.5083199739456177, 2.07338809967041]}, {"id": 86, "label": 2, "features": [-0.3002209961414337, 2.008028984069824]}, {"id": 87, "label": 2, "features": [0.4218739867210388, -1.8202509880065918]}, {"id": 88, "label": 2, "features": [3.5519700050354004, -1.250223994255066]}, {"id": 89, "label": 2, "features": [1.5598210096359253, -1.8739399909973145]}, {"id": 90, "label": 2, "features": [-0.05125200003385544, -1.954408049583435]}, {"id": 91, "label": 2, "features": [-1.7211699485778809, 1.9405139684677124]}, {"id": 92, "label": 2, "features": [-2.4832398891448975, -1.5674279928207397]}, {"id": 93, "label": 2, "features": [-3.1551098823547363, 1.6419780254364014]}, {"id": 94, "label": 2, "features": [-1.744156002998352, -1.6970750093460083]}, {"id": 95, "label": 2, "features": [2.612607955932617, 1.796733021736145]}, {"id": 96, "label": 2, "features": [2.99202299118042, -1.589324951171875]}, {"id": 97, "label": 2, "features": [-1.2485530376434326, -1.8398369550704956]}, {"id": 98, "label": 2, "features": [4.694591999053955, -0.6377410292625427]}, {"id": 99, "label": 2, "features": [0.8488690257072449, 2.003649950027466]}]} \ No newline at end of file diff --git a/data/boat.txt b/data/boat.txt index 7846b35..38e523a 100644 --- a/data/boat.txt +++ b/data/boat.txt @@ -1,100 +1,100 @@ -0.000000000000000000e+00 1.000000000000000000e+00 -1.528821945190429688e+00 9.044460058212280273e-01 -1.000000000000000000e+00 1.000000000000000000e+00 -2.036158084869384766e+00 -4.268300160765647888e-02 -2.000000000000000000e+00 1.000000000000000000e+00 -1.446954965591430664e+00 5.854420065879821777e-01 -3.000000000000000000e+00 1.000000000000000000e+00 -2.102005958557128906e+00 3.485429883003234863e-01 -4.000000000000000000e+00 1.000000000000000000e+00 -6.457939743995666504e-01 -3.123669922351837158e-01 -5.000000000000000000e+00 1.000000000000000000e+00 -1.311014056205749512e+00 2.309740036725997925e-01 -6.000000000000000000e+00 1.000000000000000000e+00 -7.009739875793457031e-01 3.855150043964385986e-01 -7.000000000000000000e+00 1.000000000000000000e+00 -1.620692968368530273e+00 4.020459949970245361e-01 -8.000000000000000000e+00 1.000000000000000000e+00 -1.280570030212402344e+00 -4.002290070056915283e-01 -9.000000000000000000e+00 1.000000000000000000e+00 -1.916879057884216309e+00 -8.051069974899291992e-01 -1.000000000000000000e+01 1.000000000000000000e+00 -1.705103993415832520e+00 -3.333750069141387939e-01 -1.100000000000000000e+01 1.000000000000000000e+00 -2.488229990005493164e+00 1.488360017538070679e-01 -1.200000000000000000e+01 1.000000000000000000e+00 -1.012195944786071777e+00 6.136620044708251953e-01 -1.300000000000000000e+01 1.000000000000000000e+00 -1.224858999252319336e+00 -4.974569976329803467e-01 -1.400000000000000000e+01 1.000000000000000000e+00 -2.211359024047851562e+00 3.031019866466522217e-01 -1.500000000000000000e+01 1.000000000000000000e+00 -6.395059823989868164e-01 -3.801169991493225098e-01 -1.600000000000000000e+01 1.000000000000000000e+00 -1.962365984916687012e+00 7.290200144052505493e-02 -1.700000000000000000e+01 1.000000000000000000e+00 -2.173443078994750977e+00 -5.780240297317504883e-01 -1.800000000000000000e+01 1.000000000000000000e+00 -2.066375970840454102e+00 3.035799860954284668e-01 -1.900000000000000000e+01 1.000000000000000000e+00 -1.165135979652404785e+00 -3.781329989433288574e-01 -2.000000000000000000e+01 1.000000000000000000e+00 -1.886734008789062500e+00 4.413599967956542969e-01 -2.100000000000000000e+01 1.000000000000000000e+00 -2.227478981018066406e+00 2.339909970760345459e-01 -2.200000000000000000e+01 1.000000000000000000e+00 -1.962036967277526855e+00 -5.586720108985900879e-01 -2.300000000000000000e+01 1.000000000000000000e+00 -1.074198007583618164e+00 9.799300134181976318e-02 -2.400000000000000000e+01 1.000000000000000000e+00 -6.173030138015747070e-01 -3.402700126171112061e-01 -2.500000000000000000e+01 1.000000000000000000e+00 -1.091027021408081055e+00 8.868510127067565918e-01 -2.600000000000000000e+01 1.000000000000000000e+00 -1.336810946464538574e+00 7.603080272674560547e-01 -2.700000000000000000e+01 1.000000000000000000e+00 -1.000777006149291992e+00 -2.407650053501129150e-01 -2.800000000000000000e+01 1.000000000000000000e+00 -1.048877000808715820e+00 -6.744040250778198242e-01 -2.900000000000000000e+01 1.000000000000000000e+00 -9.476150274276733398e-01 2.265910059213638306e-01 -3.000000000000000000e+01 1.000000000000000000e+00 -5.829480290412902832e-01 3.597170114517211914e-01 -3.100000000000000000e+01 1.000000000000000000e+00 -2.390062093734741211e+00 1.996829956769943237e-01 -3.200000000000000000e+01 1.000000000000000000e+00 -1.713708043098449707e+00 -5.692679882049560547e-01 -3.300000000000000000e+01 2.000000000000000000e+00 1.264798998832702637e+00 -8.464919924736022949e-01 -3.400000000000000000e+01 2.000000000000000000e+00 9.148470163345336914e-01 5.775660276412963867e-01 -3.500000000000000000e+01 2.000000000000000000e+00 9.355750083923339844e-01 7.558829784393310547e-01 -3.600000000000000000e+01 2.000000000000000000e+00 1.605083942413330078e+00 4.442799985408782959e-01 -3.700000000000000000e+01 2.000000000000000000e+00 2.836901903152465820e+00 -6.886640191078186035e-01 -3.800000000000000000e+01 2.000000000000000000e+00 1.225911021232604980e+00 -3.732050061225891113e-01 -3.900000000000000000e+01 2.000000000000000000e+00 9.587630033493041992e-01 -2.847500145435333252e-01 -4.000000000000000000e+01 2.000000000000000000e+00 9.543809890747070312e-01 5.873339772224426270e-01 -4.100000000000000000e+01 2.000000000000000000e+00 2.898461103439331055e+00 -7.795230150222778320e-01 -4.200000000000000000e+01 2.000000000000000000e+00 2.145201921463012695e+00 -7.348560094833374023e-01 -4.300000000000000000e+01 2.000000000000000000e+00 1.520059943199157715e+00 -7.304250001907348633e-01 -4.400000000000000000e+01 2.000000000000000000e+00 1.346652984619140625e+00 -2.069060057401657104e-01 -4.500000000000000000e+01 2.000000000000000000e+00 1.170287013053894043e+00 -5.178830027580261230e-01 -4.600000000000000000e+01 2.000000000000000000e+00 2.755032062530517578e+00 -2.177979946136474609e-01 -4.700000000000000000e+01 2.000000000000000000e+00 1.922526001930236816e+00 -8.142079710960388184e-01 -4.800000000000000000e+01 2.000000000000000000e+00 9.433979988098144531e-01 -6.809300184249877930e-01 -4.900000000000000000e+01 2.000000000000000000e+00 2.589031934738159180e+00 7.583069801330566406e-01 -5.000000000000000000e+01 2.000000000000000000e+00 1.273978948593139648e+00 9.826099872589111328e-01 -5.100000000000000000e+01 2.000000000000000000e+00 2.324059963226318359e+00 7.427290081977844238e-01 -5.200000000000000000e+01 2.000000000000000000e+00 1.859261989593505859e+00 -7.989999838173389435e-03 -5.300000000000000000e+01 2.000000000000000000e+00 1.475064039230346680e+00 -8.781170248985290527e-01 -5.400000000000000000e+01 2.000000000000000000e+00 1.424934983253479004e+00 -6.274780035018920898e-01 -5.500000000000000000e+01 2.000000000000000000e+00 2.734179973602294922e+00 -7.534430027008056641e-01 -5.600000000000000000e+01 2.000000000000000000e+00 9.268910288810729980e-01 -2.606190145015716553e-01 -5.700000000000000000e+01 2.000000000000000000e+00 2.297281980514526367e+00 7.786939740180969238e-01 -5.800000000000000000e+01 2.000000000000000000e+00 2.087541103363037109e+00 -6.866179704666137695e-01 -5.900000000000000000e+01 2.000000000000000000e+00 1.533378958702087402e+00 -5.332090258598327637e-01 -6.000000000000000000e+01 2.000000000000000000e+00 9.168440103530883789e-01 -2.061920017004013062e-01 -6.100000000000000000e+01 2.000000000000000000e+00 2.199736118316650391e+00 -8.299990296363830566e-01 -6.200000000000000000e+01 2.000000000000000000e+00 2.437618970870971680e+00 9.394029974937438965e-01 -6.300000000000000000e+01 2.000000000000000000e+00 2.329593896865844727e+00 5.639240145683288574e-01 -6.400000000000000000e+01 2.000000000000000000e+00 1.375130057334899902e+00 -6.085379719734191895e-01 -6.500000000000000000e+01 2.000000000000000000e+00 1.426427960395812988e+00 4.275699853897094727e-01 -6.600000000000000000e+01 3.000000000000000000e+00 4.775997161865234375e+00 7.011100053787231445e-01 -6.700000000000000000e+01 3.000000000000000000e+00 3.480571985244750977e+00 1.569522976875305176e+00 -6.800000000000000000e+01 3.000000000000000000e+00 1.709825992584228516e+00 2.073519945144653320e+00 -6.900000000000000000e+01 3.000000000000000000e+00 -1.307500004768371582e-01 2.127629995346069336e+00 -7.000000000000000000e+01 3.000000000000000000e+00 -1.936506032943725586e+00 1.915510058403015137e+00 -7.100000000000000000e+01 3.000000000000000000e+00 4.381993770599365234e+00 -9.449740052223205566e-01 -7.200000000000000000e+01 3.000000000000000000e+00 1.738340973854064941e+00 1.919551014900207520e+00 -7.300000000000000000e+01 3.000000000000000000e+00 2.250093936920166016e+00 -1.593212962150573730e+00 -7.400000000000000000e+01 3.000000000000000000e+00 -2.923434019088745117e+00 -1.494874000549316406e+00 -7.500000000000000000e+01 3.000000000000000000e+00 -4.997717857360839844e+00 -5.394999869167804718e-03 -7.600000000000000000e+01 3.000000000000000000e+00 -4.554725170135498047e+00 -7.430559992790222168e-01 -7.700000000000000000e+01 3.000000000000000000e+00 3.168922901153564453e+00 1.551530003547668457e+00 -7.800000000000000000e+01 3.000000000000000000e+00 2.271770000457763672e+00 1.927363038063049316e+00 -7.900000000000000000e+01 3.000000000000000000e+00 4.550985813140869141e+00 9.768109917640686035e-01 -8.000000000000000000e+01 3.000000000000000000e+00 -1.550340056419372559e+00 1.970878005027770996e+00 -8.100000000000000000e+01 3.000000000000000000e+00 -4.405232906341552734e+00 1.137701988220214844e+00 -8.200000000000000000e+01 3.000000000000000000e+00 -3.431651115417480469e+00 -1.435773015022277832e+00 -8.300000000000000000e+01 3.000000000000000000e+00 -5.005350112915039062e-01 2.068276882171630859e+00 -8.400000000000000000e+01 3.000000000000000000e+00 -2.472163915634155273e+00 -1.589836001396179199e+00 -8.500000000000000000e+01 3.000000000000000000e+00 1.508319973945617676e+00 2.073388099670410156e+00 -8.600000000000000000e+01 3.000000000000000000e+00 -3.002209961414337158e-01 2.008028984069824219e+00 -8.700000000000000000e+01 3.000000000000000000e+00 4.218739867210388184e-01 -1.820250988006591797e+00 -8.800000000000000000e+01 3.000000000000000000e+00 3.551970005035400391e+00 -1.250223994255065918e+00 -8.900000000000000000e+01 3.000000000000000000e+00 1.559821009635925293e+00 -1.873939990997314453e+00 -9.000000000000000000e+01 3.000000000000000000e+00 -5.125200003385543823e-02 -1.954408049583435059e+00 -9.100000000000000000e+01 3.000000000000000000e+00 -1.721169948577880859e+00 1.940513968467712402e+00 -9.200000000000000000e+01 3.000000000000000000e+00 -2.483239889144897461e+00 -1.567427992820739746e+00 -9.300000000000000000e+01 3.000000000000000000e+00 -3.155109882354736328e+00 1.641978025436401367e+00 -9.400000000000000000e+01 3.000000000000000000e+00 -1.744156002998352051e+00 -1.697075009346008301e+00 -9.500000000000000000e+01 3.000000000000000000e+00 2.612607955932617188e+00 1.796733021736145020e+00 -9.600000000000000000e+01 3.000000000000000000e+00 2.992022991180419922e+00 -1.589324951171875000e+00 -9.700000000000000000e+01 3.000000000000000000e+00 -1.248553037643432617e+00 -1.839836955070495605e+00 -9.800000000000000000e+01 3.000000000000000000e+00 4.694591999053955078e+00 -6.377410292625427246e-01 -9.900000000000000000e+01 3.000000000000000000e+00 8.488690257072448730e-01 2.003649950027465820e+00 +0.000000000000000000e+00 0.000000000000000000e+00 -1.528821945190429688e+00 9.044460058212280273e-01 +1.000000000000000000e+00 0.000000000000000000e+00 -2.036158084869384766e+00 -4.268300160765647888e-02 +2.000000000000000000e+00 0.000000000000000000e+00 -1.446954965591430664e+00 5.854420065879821777e-01 +3.000000000000000000e+00 0.000000000000000000e+00 -2.102005958557128906e+00 3.485429883003234863e-01 +4.000000000000000000e+00 0.000000000000000000e+00 -6.457939743995666504e-01 -3.123669922351837158e-01 +5.000000000000000000e+00 0.000000000000000000e+00 -1.311014056205749512e+00 2.309740036725997925e-01 +6.000000000000000000e+00 0.000000000000000000e+00 -7.009739875793457031e-01 3.855150043964385986e-01 +7.000000000000000000e+00 0.000000000000000000e+00 -1.620692968368530273e+00 4.020459949970245361e-01 +8.000000000000000000e+00 0.000000000000000000e+00 -1.280570030212402344e+00 -4.002290070056915283e-01 +9.000000000000000000e+00 0.000000000000000000e+00 -1.916879057884216309e+00 -8.051069974899291992e-01 +1.000000000000000000e+01 0.000000000000000000e+00 -1.705103993415832520e+00 -3.333750069141387939e-01 +1.100000000000000000e+01 0.000000000000000000e+00 -2.488229990005493164e+00 1.488360017538070679e-01 +1.200000000000000000e+01 0.000000000000000000e+00 -1.012195944786071777e+00 6.136620044708251953e-01 +1.300000000000000000e+01 0.000000000000000000e+00 -1.224858999252319336e+00 -4.974569976329803467e-01 +1.400000000000000000e+01 0.000000000000000000e+00 -2.211359024047851562e+00 3.031019866466522217e-01 +1.500000000000000000e+01 0.000000000000000000e+00 -6.395059823989868164e-01 -3.801169991493225098e-01 +1.600000000000000000e+01 0.000000000000000000e+00 -1.962365984916687012e+00 7.290200144052505493e-02 +1.700000000000000000e+01 0.000000000000000000e+00 -2.173443078994750977e+00 -5.780240297317504883e-01 +1.800000000000000000e+01 0.000000000000000000e+00 -2.066375970840454102e+00 3.035799860954284668e-01 +1.900000000000000000e+01 0.000000000000000000e+00 -1.165135979652404785e+00 -3.781329989433288574e-01 +2.000000000000000000e+01 0.000000000000000000e+00 -1.886734008789062500e+00 4.413599967956542969e-01 +2.100000000000000000e+01 0.000000000000000000e+00 -2.227478981018066406e+00 2.339909970760345459e-01 +2.200000000000000000e+01 0.000000000000000000e+00 -1.962036967277526855e+00 -5.586720108985900879e-01 +2.300000000000000000e+01 0.000000000000000000e+00 -1.074198007583618164e+00 9.799300134181976318e-02 +2.400000000000000000e+01 0.000000000000000000e+00 -6.173030138015747070e-01 -3.402700126171112061e-01 +2.500000000000000000e+01 0.000000000000000000e+00 -1.091027021408081055e+00 8.868510127067565918e-01 +2.600000000000000000e+01 0.000000000000000000e+00 -1.336810946464538574e+00 7.603080272674560547e-01 +2.700000000000000000e+01 0.000000000000000000e+00 -1.000777006149291992e+00 -2.407650053501129150e-01 +2.800000000000000000e+01 0.000000000000000000e+00 -1.048877000808715820e+00 -6.744040250778198242e-01 +2.900000000000000000e+01 0.000000000000000000e+00 -9.476150274276733398e-01 2.265910059213638306e-01 +3.000000000000000000e+01 0.000000000000000000e+00 -5.829480290412902832e-01 3.597170114517211914e-01 +3.100000000000000000e+01 0.000000000000000000e+00 -2.390062093734741211e+00 1.996829956769943237e-01 +3.200000000000000000e+01 0.000000000000000000e+00 -1.713708043098449707e+00 -5.692679882049560547e-01 +3.300000000000000000e+01 1.000000000000000000e+00 1.264798998832702637e+00 -8.464919924736022949e-01 +3.400000000000000000e+01 1.000000000000000000e+00 9.148470163345336914e-01 5.775660276412963867e-01 +3.500000000000000000e+01 1.000000000000000000e+00 9.355750083923339844e-01 7.558829784393310547e-01 +3.600000000000000000e+01 1.000000000000000000e+00 1.605083942413330078e+00 4.442799985408782959e-01 +3.700000000000000000e+01 1.000000000000000000e+00 2.836901903152465820e+00 -6.886640191078186035e-01 +3.800000000000000000e+01 1.000000000000000000e+00 1.225911021232604980e+00 -3.732050061225891113e-01 +3.900000000000000000e+01 1.000000000000000000e+00 9.587630033493041992e-01 -2.847500145435333252e-01 +4.000000000000000000e+01 1.000000000000000000e+00 9.543809890747070312e-01 5.873339772224426270e-01 +4.100000000000000000e+01 1.000000000000000000e+00 2.898461103439331055e+00 -7.795230150222778320e-01 +4.200000000000000000e+01 1.000000000000000000e+00 2.145201921463012695e+00 -7.348560094833374023e-01 +4.300000000000000000e+01 1.000000000000000000e+00 1.520059943199157715e+00 -7.304250001907348633e-01 +4.400000000000000000e+01 1.000000000000000000e+00 1.346652984619140625e+00 -2.069060057401657104e-01 +4.500000000000000000e+01 1.000000000000000000e+00 1.170287013053894043e+00 -5.178830027580261230e-01 +4.600000000000000000e+01 1.000000000000000000e+00 2.755032062530517578e+00 -2.177979946136474609e-01 +4.700000000000000000e+01 1.000000000000000000e+00 1.922526001930236816e+00 -8.142079710960388184e-01 +4.800000000000000000e+01 1.000000000000000000e+00 9.433979988098144531e-01 -6.809300184249877930e-01 +4.900000000000000000e+01 1.000000000000000000e+00 2.589031934738159180e+00 7.583069801330566406e-01 +5.000000000000000000e+01 1.000000000000000000e+00 1.273978948593139648e+00 9.826099872589111328e-01 +5.100000000000000000e+01 1.000000000000000000e+00 2.324059963226318359e+00 7.427290081977844238e-01 +5.200000000000000000e+01 1.000000000000000000e+00 1.859261989593505859e+00 -7.989999838173389435e-03 +5.300000000000000000e+01 1.000000000000000000e+00 1.475064039230346680e+00 -8.781170248985290527e-01 +5.400000000000000000e+01 1.000000000000000000e+00 1.424934983253479004e+00 -6.274780035018920898e-01 +5.500000000000000000e+01 1.000000000000000000e+00 2.734179973602294922e+00 -7.534430027008056641e-01 +5.600000000000000000e+01 1.000000000000000000e+00 9.268910288810729980e-01 -2.606190145015716553e-01 +5.700000000000000000e+01 1.000000000000000000e+00 2.297281980514526367e+00 7.786939740180969238e-01 +5.800000000000000000e+01 1.000000000000000000e+00 2.087541103363037109e+00 -6.866179704666137695e-01 +5.900000000000000000e+01 1.000000000000000000e+00 1.533378958702087402e+00 -5.332090258598327637e-01 +6.000000000000000000e+01 1.000000000000000000e+00 9.168440103530883789e-01 -2.061920017004013062e-01 +6.100000000000000000e+01 1.000000000000000000e+00 2.199736118316650391e+00 -8.299990296363830566e-01 +6.200000000000000000e+01 1.000000000000000000e+00 2.437618970870971680e+00 9.394029974937438965e-01 +6.300000000000000000e+01 1.000000000000000000e+00 2.329593896865844727e+00 5.639240145683288574e-01 +6.400000000000000000e+01 1.000000000000000000e+00 1.375130057334899902e+00 -6.085379719734191895e-01 +6.500000000000000000e+01 1.000000000000000000e+00 1.426427960395812988e+00 4.275699853897094727e-01 +6.600000000000000000e+01 2.000000000000000000e+00 4.775997161865234375e+00 7.011100053787231445e-01 +6.700000000000000000e+01 2.000000000000000000e+00 3.480571985244750977e+00 1.569522976875305176e+00 +6.800000000000000000e+01 2.000000000000000000e+00 1.709825992584228516e+00 2.073519945144653320e+00 +6.900000000000000000e+01 2.000000000000000000e+00 -1.307500004768371582e-01 2.127629995346069336e+00 +7.000000000000000000e+01 2.000000000000000000e+00 -1.936506032943725586e+00 1.915510058403015137e+00 +7.100000000000000000e+01 2.000000000000000000e+00 4.381993770599365234e+00 -9.449740052223205566e-01 +7.200000000000000000e+01 2.000000000000000000e+00 1.738340973854064941e+00 1.919551014900207520e+00 +7.300000000000000000e+01 2.000000000000000000e+00 2.250093936920166016e+00 -1.593212962150573730e+00 +7.400000000000000000e+01 2.000000000000000000e+00 -2.923434019088745117e+00 -1.494874000549316406e+00 +7.500000000000000000e+01 2.000000000000000000e+00 -4.997717857360839844e+00 -5.394999869167804718e-03 +7.600000000000000000e+01 2.000000000000000000e+00 -4.554725170135498047e+00 -7.430559992790222168e-01 +7.700000000000000000e+01 2.000000000000000000e+00 3.168922901153564453e+00 1.551530003547668457e+00 +7.800000000000000000e+01 2.000000000000000000e+00 2.271770000457763672e+00 1.927363038063049316e+00 +7.900000000000000000e+01 2.000000000000000000e+00 4.550985813140869141e+00 9.768109917640686035e-01 +8.000000000000000000e+01 2.000000000000000000e+00 -1.550340056419372559e+00 1.970878005027770996e+00 +8.100000000000000000e+01 2.000000000000000000e+00 -4.405232906341552734e+00 1.137701988220214844e+00 +8.200000000000000000e+01 2.000000000000000000e+00 -3.431651115417480469e+00 -1.435773015022277832e+00 +8.300000000000000000e+01 2.000000000000000000e+00 -5.005350112915039062e-01 2.068276882171630859e+00 +8.400000000000000000e+01 2.000000000000000000e+00 -2.472163915634155273e+00 -1.589836001396179199e+00 +8.500000000000000000e+01 2.000000000000000000e+00 1.508319973945617676e+00 2.073388099670410156e+00 +8.600000000000000000e+01 2.000000000000000000e+00 -3.002209961414337158e-01 2.008028984069824219e+00 +8.700000000000000000e+01 2.000000000000000000e+00 4.218739867210388184e-01 -1.820250988006591797e+00 +8.800000000000000000e+01 2.000000000000000000e+00 3.551970005035400391e+00 -1.250223994255065918e+00 +8.900000000000000000e+01 2.000000000000000000e+00 1.559821009635925293e+00 -1.873939990997314453e+00 +9.000000000000000000e+01 2.000000000000000000e+00 -5.125200003385543823e-02 -1.954408049583435059e+00 +9.100000000000000000e+01 2.000000000000000000e+00 -1.721169948577880859e+00 1.940513968467712402e+00 +9.200000000000000000e+01 2.000000000000000000e+00 -2.483239889144897461e+00 -1.567427992820739746e+00 +9.300000000000000000e+01 2.000000000000000000e+00 -3.155109882354736328e+00 1.641978025436401367e+00 +9.400000000000000000e+01 2.000000000000000000e+00 -1.744156002998352051e+00 -1.697075009346008301e+00 +9.500000000000000000e+01 2.000000000000000000e+00 2.612607955932617188e+00 1.796733021736145020e+00 +9.600000000000000000e+01 2.000000000000000000e+00 2.992022991180419922e+00 -1.589324951171875000e+00 +9.700000000000000000e+01 2.000000000000000000e+00 -1.248553037643432617e+00 -1.839836955070495605e+00 +9.800000000000000000e+01 2.000000000000000000e+00 4.694591999053955078e+00 -6.377410292625427246e-01 +9.900000000000000000e+01 2.000000000000000000e+00 8.488690257072448730e-01 2.003649950027465820e+00 diff --git a/examples/core/create_node.py b/examples/core/create_node.py index ef9bbed..fcc9574 100644 --- a/examples/core/create_node.py +++ b/examples/core/create_node.py @@ -4,7 +4,7 @@ # Defining index, label and features idx = 0 -label = 1 +label = 0 features = np.asarray([2, 2.5, 1.5, 4]) # Creating a Node diff --git a/examples/math/general_purpose.py b/examples/math/general_purpose.py index f93491b..1e4e008 100644 --- a/examples/math/general_purpose.py +++ b/examples/math/general_purpose.py @@ -4,8 +4,8 @@ # Defining array, labels and predictions array = np.asarray([1.5, 2, 0.5, 1.25, 1.75, 3]) -labels = [1, 1, 1, 2, 2, 2, 3] -preds = [1, 1, 2, 2, 1, 2, 3] +labels = [0, 0, 0, 1, 1, 1, 2] +preds = [0, 0, 1, 1, 0, 1, 2] # Normalizing the array norm_array = g.normalize(array) diff --git a/opfython/core/node.py b/opfython/core/node.py index 0edab0f..0aeb4ec 100644 --- a/opfython/core/node.py +++ b/opfython/core/node.py @@ -15,7 +15,7 @@ class Node: """ - def __init__(self, idx=0, label=1, features=None): + def __init__(self, idx=0, label=0, features=None): """Initialization method. Args: @@ -96,8 +96,8 @@ def label(self): def label(self, label): if not isinstance(label, int): raise e.TypeError('`label` should be an integer') - if label < 1: - raise e.ValueError('`label` should be >= 1') + if label < 0: + raise e.ValueError('`label` should be >= 0') self._label = label @@ -272,8 +272,7 @@ def pred(self, pred): if not isinstance(pred, int): raise e.TypeError('`pred` should be an integer') if pred < c.NIL: - raise e.ValueError( - '`pred` should have a value larger than `NIL`, e.g., -1') + raise e.ValueError('`pred` should have a value larger than `NIL`, e.g., -1') self._pred = pred @@ -288,7 +287,6 @@ def relevant(self): @relevant.setter def relevant(self, relevant): if relevant not in [c.RELEVANT, c.IRRELEVANT]: - raise e.TypeError( - '`relevant` should be `RELEVANT` or `IRRELEVANT`') + raise e.TypeError('`relevant` should be `RELEVANT` or `IRRELEVANT`') self._relevant = relevant diff --git a/opfython/math/general.py b/opfython/math/general.py index d3512e1..3ced4b2 100644 --- a/opfython/math/general.py +++ b/opfython/math/general.py @@ -26,7 +26,7 @@ def confusion_matrix(labels, preds): preds = np.asarray(preds) # Calculating the number of classes - n_class = np.max(labels) + n_class = np.max(labels) + 1 # Creating an empty errors matrix c_matrix = np.zeros((n_class, n_class)) @@ -34,7 +34,7 @@ def confusion_matrix(labels, preds): # For every label and prediction for label, pred in zip(labels, preds): # Increments the corresponding cell from the confusion matrix - c_matrix[label - 1][pred - 1] += 1 + c_matrix[label][pred] += 1 return c_matrix @@ -77,21 +77,21 @@ def opf_accuracy(labels, preds): preds = np.asarray(preds) # Calculating the number of classes - n_class = np.max(labels) + n_class = np.max(labels) + 1 # Creating an empty errors matrix errors = np.zeros((n_class, 2)) # Gathering the amount of labels per class - counts = np.bincount(labels)[1:] + counts = np.bincount(labels) # For every label and prediction for label, pred in zip(labels, preds): # If label is different from prediction if label != pred: # Increments the corresponding cells from the error matrix - errors[pred - 1][0] += 1 - errors[label - 1][1] += 1 + errors[pred][0] += 1 + errors[label][1] += 1 # Calculating the float value of the true label errors errors[:, 1] /= counts @@ -125,7 +125,7 @@ def opf_accuracy_per_label(labels, preds): preds = np.asarray(preds) # Calculating the number of classes - n_class = np.max(labels) + n_class = np.max(labels) + 1 # Creating an empty errors array errors = np.zeros(n_class) @@ -138,7 +138,7 @@ def opf_accuracy_per_label(labels, preds): # If label is different from prediction if label != pred: # Increments the corresponding cell from the error array - errors[label - 1] += 1 + errors[label] += 1 # Calculating the float value of the true label errors errors /= counts diff --git a/opfython/models/semi_supervised.py b/opfython/models/semi_supervised.py index 3b9af70..8025e04 100644 --- a/opfython/models/semi_supervised.py +++ b/opfython/models/semi_supervised.py @@ -67,7 +67,7 @@ def fit(self, X_train, Y_train, X_unlabeled, I_train=None): # Iterate over every possible unlabeled sample for i, feature in enumerate(X_unlabeled): # Creates a Node structure - node = Node(current_n_nodes + i, 1, feature) + node = Node(current_n_nodes + i, 0, feature) # Appends the node to the list self.subgraph.nodes.append(node) diff --git a/opfython/stream/parser.py b/opfython/stream/parser.py index a096b50..f8a1deb 100644 --- a/opfython/stream/parser.py +++ b/opfython/stream/parser.py @@ -40,10 +40,10 @@ def parse_loader(data): 'Parsed data should have at least two distinct labels') # If there are unsequential labels - if len(counts) != np.max(Y): + if len(counts) != (np.max(Y) + 1): # Raises a ValueError raise e.ValueError( - 'Parsed data should have sequential labels, e.g., 1, 2, ..., n') + 'Parsed data should have sequential labels, e.g., 0, 1, ..., n-1') logger.info('Data parsed.') diff --git a/opfython/utils/converter.py b/opfython/utils/converter.py index 61c0400..3f8fb43 100644 --- a/opfython/utils/converter.py +++ b/opfython/utils/converter.py @@ -57,7 +57,8 @@ def opf2txt(opf_path, output_file=None): data = struct.unpack(file_format, f.read(data_size)) # Appending the data to list - samples.append(data) + # Note that we subtract 1 from `labels` column + samples.append((data[0], data[1] - 1, *data[2:])) # Closing opf file f.close() @@ -119,7 +120,8 @@ def opf2csv(opf_path, output_file=None): data = struct.unpack(file_format, f.read(data_size)) # Appending the data to list - samples.append(data) + # Note that we subtract 1 from `labels` column + samples.append((data[0], data[1] - 1, *data[2:])) # Closing opf file f.close() @@ -185,7 +187,7 @@ def opf2json(opf_path, output_file=None): # Appending the data to JSON structure json['data'].append({ 'id': data[0], - 'label': data[1], + 'label': data[1] - 1, 'features': list(data[2:]) }) diff --git a/tests/opfython/core/test_node.py b/tests/opfython/core/test_node.py index 3b5a97f..ccc6bd8 100644 --- a/tests/opfython/core/test_node.py +++ b/tests/opfython/core/test_node.py @@ -31,7 +31,7 @@ def test_node_idx_setter(): def test_node_label(): n = node.Node() - assert n.label == 1 + assert n.label == 0 def test_node_label_setter(): @@ -45,7 +45,7 @@ def test_node_label_setter(): assert n.label == 1 try: - n.label = 0 + n.label = -1 except: n.label = 1 diff --git a/tests/opfython/math/test_general.py b/tests/opfython/math/test_general.py index 0200e9c..ade1526 100644 --- a/tests/opfython/math/test_general.py +++ b/tests/opfython/math/test_general.py @@ -3,8 +3,8 @@ def test_confusion_matrix(): - labels = [1, 1, 2, 2] - preds = [1, 1, 2, 2] + labels = [0, 0, 1, 1] + preds = [0, 0, 1, 1] c_matrix = general.confusion_matrix(labels, preds) @@ -20,8 +20,8 @@ def test_normalize(): def test_opf_accuracy(): - labels = [1, 1, 2, 2] - preds = [1, 1, 1, 1] + labels = [0, 0, 1, 1] + preds = [0, 0, 0, 0] acc = general.opf_accuracy(labels, preds) @@ -29,8 +29,8 @@ def test_opf_accuracy(): def test_opf_accuracy_per_label(): - labels = [1, 1, 2, 2] - preds = [1, 1, 1, 1] + labels = [0, 0, 1, 1] + preds = [0, 0, 0, 0] acc_per_label = general.opf_accuracy_per_label(labels, preds) @@ -48,8 +48,8 @@ def test_opf_pre_compute_distances(): def test_purity(): - labels = [1, 1, 2, 2] - preds = [1, 1, 2, 2] + labels = [0, 0, 1, 1] + preds = [0, 0, 1, 1] purity = general.purity(labels, preds) diff --git a/tests/opfython/models/test_unsupervised.py b/tests/opfython/models/test_unsupervised.py index c127845..a18d4a7 100644 --- a/tests/opfython/models/test_unsupervised.py +++ b/tests/opfython/models/test_unsupervised.py @@ -121,4 +121,4 @@ def test_unsupervised_opf_propagate_labels(): opf.propagate_labels() - assert opf.subgraph.nodes[0].predicted_label == 1 + assert opf.subgraph.nodes[0].predicted_label == 0