Commit 2e132412 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Add tests for logregression and update some tests

parent 451ac17f
......@@ -84,8 +84,16 @@ add_test(
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS} "${CMAKE_BINARY_DIR}/bin/sisso++" "${CMAKE_SOURCE_DIR}/tests/exec_test/log_reg/sisso.json" ${MPIEXEC_POSTFLAGS}
)
add_test(
NAME Train_Only
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS} "${CMAKE_BINARY_DIR}/bin/sisso++" "${CMAKE_SOURCE_DIR}/tests/exec_test/no_test_data/sisso.json" ${MPIEXEC_POSTFLAGS}
NAME Log_Regression_Max_Correlation_NE_One
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS} "${CMAKE_BINARY_DIR}/bin/sisso++" "${CMAKE_SOURCE_DIR}/tests/exec_test/log_reg_gen_proj/sisso.json" ${MPIEXEC_POSTFLAGS}
)
add_test(
NAME Log_Regression_Generate_Project
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS} "${CMAKE_BINARY_DIR}/bin/sisso++" "${CMAKE_SOURCE_DIR}/tests/exec_test/log_reg_max_corr/sisso.json" ${MPIEXEC_POSTFLAGS}
)
add_test(
NAME Log_Regression_Max_Correlation_NE_One_Generate_Project
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS} "${CMAKE_BINARY_DIR}/bin/sisso++" "${CMAKE_SOURCE_DIR}/tests/exec_test/log_reg_max_corr_gen_proj/sisso.json" ${MPIEXEC_POSTFLAGS}
)
if(BUILD_PARAMS)
add_test(
......
......@@ -115,7 +115,7 @@ namespace sisso
inline void initialize_params(double* params, int depth=1) const {this->get_override("set_bounds")();}
inline int n_feats() const {return this->get_override("n_feats")();}
inline std::shared_ptr<Node> feat(const int ind) const {return this->get_override("feat")();}
inline void param_derivative(const double* params, double* dfdp) const {this->get_override("param_derivative");}
inline void param_derivative(const double* params, double* dfdp, const int depth = 1) const {this->get_override("param_derivative");}
inline void gradient(double* grad, double* dfdp) const {this->get_override("gradient");}
inline void gradient(double* grad, double* dfdp, const double* params) const {this->get_override("gradient");}
inline std::vector<std::string> get_x_in_expr_list() const {return this->get_override("get_x_in_expr_list")();}
......@@ -151,7 +151,7 @@ namespace sisso
inline std::vector<double> parameters() const {return this->get_override("parameters")();}
inline void set_bounds(double* lb, double* ub, const int depth=1) const {this->get_override("set_bounds")();}
inline void initialize_params(double* params, int depth=1) const {this->get_override("set_bounds")();}
inline void param_derivative(const double* params, double* dfdp) const {this->get_override("param_derivative");}
inline void param_derivative(const double* params, double* dfdp, const int depth = 1) const {this->get_override("param_derivative");}
};
#else
/**
......
......@@ -6,11 +6,10 @@
"data_file": "data.csv",
"data_file_relatice_to_json": true,
"property_key": "prop",
"leave_out_frac": 0.2,
"leave_out_frac": 0.0,
"n_models_store": 1,
"n_rung_generate": 1,
"calc_type": "classification",
"leave_out_inds": [ 2, 3, 4, 6, 21, 23, 30, 38, 39, 52, 53, 61, 76, 82, 83, 45, 47, 48, 49, 66 ],
"opset": ["add", "sub", "abs_diff", "mult", "div", "inv", "abs", "exp", "log", "sin", "cos", "sq", "cb", "six_pow", "sqrt", "cbrt", "neg_exp"],
"param_opset" : [],
"fix_intercept": false
......
......@@ -7,10 +7,9 @@
"data_file_relatice_to_json": true,
"property_key": "Prop",
"task_key": "Task",
"leave_out_frac": 0.05,
"leave_out_frac": 0.0,
"n_models_store": 1,
"n_rung_generate": 1,
"leave_out_inds": [0, 1, 2, 60, 61],
"opset": ["add", "sub", "abs_diff", "mult", "div", "inv", "abs", "exp", "log", "sin", "cos", "sq", "cb", "six_pow", "sqrt", "cbrt", "neg_exp"],
"param_opset": [],
"fix_intercept": false
......
from sissopp import ModelLogRegressor
from pathlib import Path
import numpy as np
model = ModelLogRegressor(
str("models/train_dim_2_model_0.dat"), str("models/test_dim_2_model_0.dat")
)
assert model.rmse < 1e-4
assert model.test_rmse < 1e-4
Sample,Prop,A,B,C,D
1,0.042644585721321,49.8070975337169,307.029288124149,127.290160977898,119.363921090366
2,0.051286552544473,207.151687934325,385.803129282962,232.077642053051,152.451146796233
3,0.115456483870835,259.115243485315,350.89565982664,126.112015312861,194.269240170231
4,15.1980039696031,341.392794952748,2.50119646241174,370.843032180154,11.5134267982876
5,0.030828548720774,123.642359657426,107.674457089161,278.481606674966,277.417740655869
6,0.113310081828946,434.902594566398,405.870579391739,241.257457440821,213.210004173378
7,0.071973103667228,393.51387804721,243.422246542275,98.6921352953811,38.4646528894646
8,0.079124869408332,454.177123336891,312.18007412968,365.093447826501,93.4027537695288
9,0.084392098447046,262.904172099227,476.075762264071,95.6336322308505,269.096484900607
10,0.044467510536784,447.85350715457,423.476173355266,422.140647530134,105.30966798588
11,0.032607637392685,156.982834162006,216.937871068582,436.272542198989,438.578448993111
12,0.026590761658031,30.4947043445939,353.866638985695,131.530432627816,103.578990316735
13,0.882677326292512,324.183123925377,379.786690798287,93.7301886485703,440.061356079183
14,2.92863264703151,253.756388912426,191.488748047164,69.2744710777569,166.908183251839
15,0.041178758470398,433.425208331938,422.012179205648,138.480233516687,94.7864081755759
16,0.02951523999224,364.325349150667,478.127595998362,85.6428392655327,93.6000841896524
17,0.103881442342912,286.280745819571,226.720331942159,138.891298487121,78.0909759774124
18,0.079447386532567,184.446053206631,428.401650931551,356.108594859543,238.138089889099
19,0.490048714715941,437.097165477292,89.4506321427452,357.249495038998,21.2823078127849
20,0.315083955685341,464.689646103278,357.8239998639,166.719192215288,470.323737680847
21,0.336628829642389,453.229393345602,121.062956838254,368.072231287668,33.8834258163608
22,0.596250795257965,329.206703754852,336.263700827181,259.138467352137,407.462821099063
23,0.024008996387738,429.499336054639,451.30307811156,253.003258066353,11.9533585885846
24,0.702221733754583,293.874006420616,221.692047223248,42.2106293777491,277.645795523081
25,0.807995736802549,276.103314658051,161.778514482533,426.942506234502,208.868975590116
26,0.002730384017923,83.1768893799547,13.0356263432169,197.449738789384,355.96703006125
27,0.034760234337076,239.859835781859,226.950754683377,422.533852762138,472.823756482285
28,0.103325140788876,142.348449069038,308.188608196991,19.8589904106916,445.782867882951
29,0.069515399570576,325.065695936087,341.202112577236,280.094904922382,126.698479235295
30,0.026792086484689,105.496640506796,431.709809945209,201.067642207524,125.346044992663
31,0.06968520346432,278.288015848546,340.463606947326,62.5783439753465,135.763786890355
32,0.033814657993073,314.022680967248,366.997527539967,146.288622368974,52.3761667809278
33,0.036437360543752,182.544295340408,74.6987790052084,111.509818170011,241.023451399827
34,0.007278291999309,161.331981931619,108.016457758383,331.063276457351,498.833301187792
35,0.063162819962502,489.309265600451,424.263298255808,159.148021054163,150.645927662812
36,0.084687250049346,268.778111170417,12.2088368874704,283.50778492837,126.160505819305
37,0.193238168342884,356.429298308577,16.8790201937628,79.0256508718712,105.78215423975
38,0.002398998011824,18.700576586924,54.7261653842681,148.691281396519,365.033771980965
39,0.153459585676185,294.597161844894,103.910596069842,345.840575142828,208.072222213417
40,0.008244336063986,284.63690286644,15.4716735442082,102.064258484033,407.319217444755
41,0.038860594113166,242.474343916146,489.029235376506,398.649900719263,182.88700899363
42,0.068119481955482,288.653567920823,104.182871116269,70.369683070715,260.771564816744
43,0.645977325788857,285.468431709879,261.088369157819,493.106944180385,321.625679649568
44,0.056318139669975,180.087855188098,72.886342824395,103.167691072242,204.56315967502
45,4.03890609225025,198.253697705946,243.375043815026,348.789155694472,222.634358725914
46,0.050956703375414,66.8423643063199,65.3676810191975,496.070776260521,158.342895817271
47,7.71218334170515,395.439636236816,230.35515336685,64.9645947685536,211.908463158588
48,0.0214328895491,176.169330689589,464.950315259736,452.14257500201,81.9464407280035
49,2.6815357030127,431.955781915035,308.66349882149,253.874224338872,343.837415858124
50,0.750972167059506,224.327882299282,147.30201835669,243.603529830416,103.105383948355
51,0.01828936588316,249.505131204334,114.794245180025,129.495085479016,408.195718175082
52,0.323325638910123,159.141681749234,106.854744390776,18.9019889656962,51.4307457794658
53,0.033770961308791,413.581373474192,154.408120689668,446.571947766101,435.968644308603
54,0.318264739192304,346.575691958707,59.8626851714252,255.289629539941,132.392312946497
55,0.543889052259968,202.50018301682,224.87814578565,179.824036025239,168.045578982369
56,0.014813028268087,317.664906479146,95.6823941971786,410.391814113528,449.004998805183
57,3.57717288413323,275.990345747377,445.847337469333,364.60493511239,475.71306458261
58,0.129900583191695,9.14924177359304,119.375334020565,113.361398805488,62.8300931374718
59,0.03708937574487,185.837293865833,447.695352621602,145.051135814477,160.694140439915
60,0.014921382861101,8.28959490938569,378.093007577705,419.707558105521,40.4024046726325
61,0.387351324110643,407.707347482472,350.199800459508,105.74924661113,253.972219444862
62,0.101466855479979,267.424013298673,386.705098956208,106.841281052243,212.004932409899
63,1.32736567001172,352.225865613491,171.568875244562,466.911865424454,130.806654602562
64,0.028663161770634,200.509116400279,185.054151659821,169.780882949394,426.355265958408
65,0.066319972191657,393.903835973502,34.1090298843032,395.993284870997,201.465690562591
66,0.225228846252684,416.977891536474,469.286103651892,451.235879905236,329.368398152194
67,0.193954759220393,161.654732137163,117.19778787807,386.605589800927,191.350615565409
68,0.096588543650903,207.153853909472,281.333900278231,463.836665364427,431.036779599936
69,0.045009258705634,363.180221118644,60.3413214970106,282.709764209504,263.181135410842
70,0.148522003805379,337.475883356403,345.712927332466,287.038267897121,198.123437087294
71,0.233773563579686,417.561141951304,416.699554349938,87.471372642944,284.442500963842
72,0.07632953740424,353.462065059428,230.244117781226,205.862394545593,418.718162036753
73,0.018751232608648,211.936255629827,38.9153036995522,335.407375291207,269.160151304954
74,0.11436186782933,232.953194819263,75.6969339038158,145.359684234586,179.190191924589
75,0.059780123967251,69.2355001498863,279.298667202486,382.963222385851,434.84703056805
76,0.039466512803061,423.250211589563,470.623951042526,385.799699148574,127.024253733708
77,0.012044591018025,208.006274730239,51.9283654736177,256.955959532126,347.239249164622
78,0.02529290143529,104.714857532854,304.9501964971,31.8389612251596,37.8811131918349
79,0.004302255370929,177.067793973296,28.3724394563165,331.479931132225,461.564224843564
80,0.074133627013002,158.134705180115,315.976143027337,278.395310237464,484.311241814557
81,0.160836802038602,410.048253861679,191.235924936736,470.978702738376,322.209828240428
82,2.01269810172184,405.219860759387,382.357826642821,340.408900681332,340.037356281025
83,0.086463232833669,465.637225155392,273.935550533945,471.461401666282,69.4129300775254
84,0.09652399673283,484.793856217189,217.858512463092,317.765365776244,30.5574828436997
85,25.7254804725824,82.523989196792,270.839083225059,174.362686576973,263.842713219115
86,3123.2782662272,106.094612132738,332.523075165983,43.7520305984393,333.205085763281
87,0.024585156837383,445.981783633524,66.2298255679999,373.905334245721,377.150351563984
88,0.018205881117995,117.196993636293,487.277963654347,133.617747939771,85.6568366996931
89,0.188996142204433,479.415773481536,87.8379455379654,429.859856289863,204.165337443809
90,0.030687409853583,324.976847605473,470.960628473335,126.942577378075,106.983488589713
91,0.084751033512141,234.705200183164,155.730168172949,303.535045799807,16.2640518096776
92,0.019959943675665,342.417666791063,8.85018592692246,287.691069761052,283.171709994183
93,0.017102517653105,162.236891091598,81.3657842047582,456.824872475328,318.421521204707
94,0.070128975496401,23.8513212365969,333.533751731515,196.322141219655,479.082443413362
95,0.006819280465836,151.095020172981,37.8615330871062,227.034115691539,362.755341229094
96,0.009406739334267,32.3147853544107,113.549008148151,57.9053526795503,348.470092929769
97,0.026975504059684,53.4863829718894,186.176691450922,56.7764485836142,371.957528066938
98,711.780196017338,7.36908228123383,488.268102038773,252.670421142526,486.698386703915
99,2.82416953708447,183.480683022873,368.758162863328,2.80315566798772,340.166678214112
100,0.3850029324009,482.322626243789,100.05861510573,495.618985557607,17.9764839910466
{
"desc_dim": 2,
"n_sis_select": 1,
"max_rung": 2,
"max_rung": 1,
"n_residual": 1,
"data_file": "../data.csv",
"data_file": "data.csv",
"data_file_relatice_to_json": true,
"property_key": "Prop",
"task_key": "Task",
"leave_out_frac": 0.00,
"n_models_store": 1,
"n_rung_generate": 1,
"calc_type": "log_regression",
"opset": ["add", "sub", "abs_diff", "mult", "div", "inv", "abs", "exp", "log", "sin", "cos", "sq", "cb", "six_pow", "sqrt", "cbrt", "neg_exp"],
"param_opset": [],
"fix_intercept": false
}
from sissopp import ModelLogRegressor
from pathlib import Path
import numpy as np
model = ModelLogRegressor(
str("models/train_dim_2_model_0.dat"), str("models/test_dim_2_model_0.dat")
)
assert model.rmse < 1e-4
assert model.test_rmse < 1e-4
Sample,Prop,A,B,C,D
1,0.042644585721321,49.8070975337169,307.029288124149,127.290160977898,119.363921090366
2,0.051286552544473,207.151687934325,385.803129282962,232.077642053051,152.451146796233
3,0.115456483870835,259.115243485315,350.89565982664,126.112015312861,194.269240170231
4,15.1980039696031,341.392794952748,2.50119646241174,370.843032180154,11.5134267982876
5,0.030828548720774,123.642359657426,107.674457089161,278.481606674966,277.417740655869
6,0.113310081828946,434.902594566398,405.870579391739,241.257457440821,213.210004173378
7,0.071973103667228,393.51387804721,243.422246542275,98.6921352953811,38.4646528894646
8,0.079124869408332,454.177123336891,312.18007412968,365.093447826501,93.4027537695288
9,0.084392098447046,262.904172099227,476.075762264071,95.6336322308505,269.096484900607
10,0.044467510536784,447.85350715457,423.476173355266,422.140647530134,105.30966798588
11,0.032607637392685,156.982834162006,216.937871068582,436.272542198989,438.578448993111
12,0.026590761658031,30.4947043445939,353.866638985695,131.530432627816,103.578990316735
13,0.882677326292512,324.183123925377,379.786690798287,93.7301886485703,440.061356079183
14,2.92863264703151,253.756388912426,191.488748047164,69.2744710777569,166.908183251839
15,0.041178758470398,433.425208331938,422.012179205648,138.480233516687,94.7864081755759
16,0.02951523999224,364.325349150667,478.127595998362,85.6428392655327,93.6000841896524
17,0.103881442342912,286.280745819571,226.720331942159,138.891298487121,78.0909759774124
18,0.079447386532567,184.446053206631,428.401650931551,356.108594859543,238.138089889099
19,0.490048714715941,437.097165477292,89.4506321427452,357.249495038998,21.2823078127849
20,0.315083955685341,464.689646103278,357.8239998639,166.719192215288,470.323737680847
21,0.336628829642389,453.229393345602,121.062956838254,368.072231287668,33.8834258163608
22,0.596250795257965,329.206703754852,336.263700827181,259.138467352137,407.462821099063
23,0.024008996387738,429.499336054639,451.30307811156,253.003258066353,11.9533585885846
24,0.702221733754583,293.874006420616,221.692047223248,42.2106293777491,277.645795523081
25,0.807995736802549,276.103314658051,161.778514482533,426.942506234502,208.868975590116
26,0.002730384017923,83.1768893799547,13.0356263432169,197.449738789384,355.96703006125
27,0.034760234337076,239.859835781859,226.950754683377,422.533852762138,472.823756482285
28,0.103325140788876,142.348449069038,308.188608196991,19.8589904106916,445.782867882951
29,0.069515399570576,325.065695936087,341.202112577236,280.094904922382,126.698479235295
30,0.026792086484689,105.496640506796,431.709809945209,201.067642207524,125.346044992663
31,0.06968520346432,278.288015848546,340.463606947326,62.5783439753465,135.763786890355
32,0.033814657993073,314.022680967248,366.997527539967,146.288622368974,52.3761667809278
33,0.036437360543752,182.544295340408,74.6987790052084,111.509818170011,241.023451399827
34,0.007278291999309,161.331981931619,108.016457758383,331.063276457351,498.833301187792
35,0.063162819962502,489.309265600451,424.263298255808,159.148021054163,150.645927662812
36,0.084687250049346,268.778111170417,12.2088368874704,283.50778492837,126.160505819305
37,0.193238168342884,356.429298308577,16.8790201937628,79.0256508718712,105.78215423975
38,0.002398998011824,18.700576586924,54.7261653842681,148.691281396519,365.033771980965
39,0.153459585676185,294.597161844894,103.910596069842,345.840575142828,208.072222213417
40,0.008244336063986,284.63690286644,15.4716735442082,102.064258484033,407.319217444755
41,0.038860594113166,242.474343916146,489.029235376506,398.649900719263,182.88700899363
42,0.068119481955482,288.653567920823,104.182871116269,70.369683070715,260.771564816744
43,0.645977325788857,285.468431709879,261.088369157819,493.106944180385,321.625679649568
44,0.056318139669975,180.087855188098,72.886342824395,103.167691072242,204.56315967502
45,4.03890609225025,198.253697705946,243.375043815026,348.789155694472,222.634358725914
46,0.050956703375414,66.8423643063199,65.3676810191975,496.070776260521,158.342895817271
47,7.71218334170515,395.439636236816,230.35515336685,64.9645947685536,211.908463158588
48,0.0214328895491,176.169330689589,464.950315259736,452.14257500201,81.9464407280035
49,2.6815357030127,431.955781915035,308.66349882149,253.874224338872,343.837415858124
50,0.750972167059506,224.327882299282,147.30201835669,243.603529830416,103.105383948355
51,0.01828936588316,249.505131204334,114.794245180025,129.495085479016,408.195718175082
52,0.323325638910123,159.141681749234,106.854744390776,18.9019889656962,51.4307457794658
53,0.033770961308791,413.581373474192,154.408120689668,446.571947766101,435.968644308603
54,0.318264739192304,346.575691958707,59.8626851714252,255.289629539941,132.392312946497
55,0.543889052259968,202.50018301682,224.87814578565,179.824036025239,168.045578982369
56,0.014813028268087,317.664906479146,95.6823941971786,410.391814113528,449.004998805183
57,3.57717288413323,275.990345747377,445.847337469333,364.60493511239,475.71306458261
58,0.129900583191695,9.14924177359304,119.375334020565,113.361398805488,62.8300931374718
59,0.03708937574487,185.837293865833,447.695352621602,145.051135814477,160.694140439915
60,0.014921382861101,8.28959490938569,378.093007577705,419.707558105521,40.4024046726325
61,0.387351324110643,407.707347482472,350.199800459508,105.74924661113,253.972219444862
62,0.101466855479979,267.424013298673,386.705098956208,106.841281052243,212.004932409899
63,1.32736567001172,352.225865613491,171.568875244562,466.911865424454,130.806654602562
64,0.028663161770634,200.509116400279,185.054151659821,169.780882949394,426.355265958408
65,0.066319972191657,393.903835973502,34.1090298843032,395.993284870997,201.465690562591
66,0.225228846252684,416.977891536474,469.286103651892,451.235879905236,329.368398152194
67,0.193954759220393,161.654732137163,117.19778787807,386.605589800927,191.350615565409
68,0.096588543650903,207.153853909472,281.333900278231,463.836665364427,431.036779599936
69,0.045009258705634,363.180221118644,60.3413214970106,282.709764209504,263.181135410842
70,0.148522003805379,337.475883356403,345.712927332466,287.038267897121,198.123437087294
71,0.233773563579686,417.561141951304,416.699554349938,87.471372642944,284.442500963842
72,0.07632953740424,353.462065059428,230.244117781226,205.862394545593,418.718162036753
73,0.018751232608648,211.936255629827,38.9153036995522,335.407375291207,269.160151304954
74,0.11436186782933,232.953194819263,75.6969339038158,145.359684234586,179.190191924589
75,0.059780123967251,69.2355001498863,279.298667202486,382.963222385851,434.84703056805
76,0.039466512803061,423.250211589563,470.623951042526,385.799699148574,127.024253733708
77,0.012044591018025,208.006274730239,51.9283654736177,256.955959532126,347.239249164622
78,0.02529290143529,104.714857532854,304.9501964971,31.8389612251596,37.8811131918349
79,0.004302255370929,177.067793973296,28.3724394563165,331.479931132225,461.564224843564
80,0.074133627013002,158.134705180115,315.976143027337,278.395310237464,484.311241814557
81,0.160836802038602,410.048253861679,191.235924936736,470.978702738376,322.209828240428
82,2.01269810172184,405.219860759387,382.357826642821,340.408900681332,340.037356281025
83,0.086463232833669,465.637225155392,273.935550533945,471.461401666282,69.4129300775254
84,0.09652399673283,484.793856217189,217.858512463092,317.765365776244,30.5574828436997
85,25.7254804725824,82.523989196792,270.839083225059,174.362686576973,263.842713219115
86,3123.2782662272,106.094612132738,332.523075165983,43.7520305984393,333.205085763281
87,0.024585156837383,445.981783633524,66.2298255679999,373.905334245721,377.150351563984
88,0.018205881117995,117.196993636293,487.277963654347,133.617747939771,85.6568366996931
89,0.188996142204433,479.415773481536,87.8379455379654,429.859856289863,204.165337443809
90,0.030687409853583,324.976847605473,470.960628473335,126.942577378075,106.983488589713
91,0.084751033512141,234.705200183164,155.730168172949,303.535045799807,16.2640518096776
92,0.019959943675665,342.417666791063,8.85018592692246,287.691069761052,283.171709994183
93,0.017102517653105,162.236891091598,81.3657842047582,456.824872475328,318.421521204707
94,0.070128975496401,23.8513212365969,333.533751731515,196.322141219655,479.082443413362
95,0.006819280465836,151.095020172981,37.8615330871062,227.034115691539,362.755341229094
96,0.009406739334267,32.3147853544107,113.549008148151,57.9053526795503,348.470092929769
97,0.026975504059684,53.4863829718894,186.176691450922,56.7764485836142,371.957528066938
98,711.780196017338,7.36908228123383,488.268102038773,252.670421142526,486.698386703915
99,2.82416953708447,183.480683022873,368.758162863328,2.80315566798772,340.166678214112
100,0.3850029324009,482.322626243789,100.05861510573,495.618985557607,17.9764839910466
{
"desc_dim": 2,
"n_sis_select": 1,
"max_rung": 1,
"n_residual": 1,
"data_file": "data.csv",
"data_file_relatice_to_json": true,
"property_key": "Prop",
"leave_out_frac": 0.05,
"n_models_store": 1,
"calc_type": "log_regression",
"max_feat_cross_correlation": 0.99,
"leave_out_inds": [0, 1, 2, 60, 61],
"opset": ["add", "sub", "abs_diff", "mult", "div", "inv", "abs", "exp", "log", "sin", "cos", "sq", "cb", "six_pow", "sqrt", "cbrt", "neg_exp"],
"param_opset": [],
"fix_intercept": false
}
from sissopp import ModelLogRegressor
from pathlib import Path
import numpy as np
model = ModelLogRegressor(
str("models/train_dim_2_model_0.dat"), str("models/test_dim_2_model_0.dat")
)
assert model.rmse < 1e-4
assert model.test_rmse < 1e-4
Sample,Prop,A,B,C,D
1,0.042644585721321,49.8070975337169,307.029288124149,127.290160977898,119.363921090366
2,0.051286552544473,207.151687934325,385.803129282962,232.077642053051,152.451146796233
3,0.115456483870835,259.115243485315,350.89565982664,126.112015312861,194.269240170231
4,15.1980039696031,341.392794952748,2.50119646241174,370.843032180154,11.5134267982876
5,0.030828548720774,123.642359657426,107.674457089161,278.481606674966,277.417740655869
6,0.113310081828946,434.902594566398,405.870579391739,241.257457440821,213.210004173378
7,0.071973103667228,393.51387804721,243.422246542275,98.6921352953811,38.4646528894646
8,0.079124869408332,454.177123336891,312.18007412968,365.093447826501,93.4027537695288
9,0.084392098447046,262.904172099227,476.075762264071,95.6336322308505,269.096484900607
10,0.044467510536784,447.85350715457,423.476173355266,422.140647530134,105.30966798588
11,0.032607637392685,156.982834162006,216.937871068582,436.272542198989,438.578448993111
12,0.026590761658031,30.4947043445939,353.866638985695,131.530432627816,103.578990316735
13,0.882677326292512,324.183123925377,379.786690798287,93.7301886485703,440.061356079183
14,2.92863264703151,253.756388912426,191.488748047164,69.2744710777569,166.908183251839
15,0.041178758470398,433.425208331938,422.012179205648,138.480233516687,94.7864081755759
16,0.02951523999224,364.325349150667,478.127595998362,85.6428392655327,93.6000841896524
17,0.103881442342912,286.280745819571,226.720331942159,138.891298487121,78.0909759774124
18,0.079447386532567,184.446053206631,428.401650931551,356.108594859543,238.138089889099
19,0.490048714715941,437.097165477292,89.4506321427452,357.249495038998,21.2823078127849
20,0.315083955685341,464.689646103278,357.8239998639,166.719192215288,470.323737680847
21,0.336628829642389,453.229393345602,121.062956838254,368.072231287668,33.8834258163608
22,0.596250795257965,329.206703754852,336.263700827181,259.138467352137,407.462821099063
23,0.024008996387738,429.499336054639,451.30307811156,253.003258066353,11.9533585885846
24,0.702221733754583,293.874006420616,221.692047223248,42.2106293777491,277.645795523081
25,0.807995736802549,276.103314658051,161.778514482533,426.942506234502,208.868975590116
26,0.002730384017923,83.1768893799547,13.0356263432169,197.449738789384,355.96703006125
27,0.034760234337076,239.859835781859,226.950754683377,422.533852762138,472.823756482285
28,0.103325140788876,142.348449069038,308.188608196991,19.8589904106916,445.782867882951
29,0.069515399570576,325.065695936087,341.202112577236,280.094904922382,126.698479235295
30,0.026792086484689,105.496640506796,431.709809945209,201.067642207524,125.346044992663
31,0.06968520346432,278.288015848546,340.463606947326,62.5783439753465,135.763786890355
32,0.033814657993073,314.022680967248,366.997527539967,146.288622368974,52.3761667809278
33,0.036437360543752,182.544295340408,74.6987790052084,111.509818170011,241.023451399827
34,0.007278291999309,161.331981931619,108.016457758383,331.063276457351,498.833301187792
35,0.063162819962502,489.309265600451,424.263298255808,159.148021054163,150.645927662812
36,0.084687250049346,268.778111170417,12.2088368874704,283.50778492837,126.160505819305
37,0.193238168342884,356.429298308577,16.8790201937628,79.0256508718712,105.78215423975
38,0.002398998011824,18.700576586924,54.7261653842681,148.691281396519,365.033771980965
39,0.153459585676185,294.597161844894,103.910596069842,345.840575142828,208.072222213417
40,0.008244336063986,284.63690286644,15.4716735442082,102.064258484033,407.319217444755
41,0.038860594113166,242.474343916146,489.029235376506,398.649900719263,182.88700899363
42,0.068119481955482,288.653567920823,104.182871116269,70.369683070715,260.771564816744
43,0.645977325788857,285.468431709879,261.088369157819,493.106944180385,321.625679649568
44,0.056318139669975,180.087855188098,72.886342824395,103.167691072242,204.56315967502
45,4.03890609225025,198.253697705946,243.375043815026,348.789155694472,222.634358725914
46,0.050956703375414,66.8423643063199,65.3676810191975,496.070776260521,158.342895817271
47,7.71218334170515,395.439636236816,230.35515336685,64.9645947685536,211.908463158588
48,0.0214328895491,176.169330689589,464.950315259736,452.14257500201,81.9464407280035
49,2.6815357030127,431.955781915035,308.66349882149,253.874224338872,343.837415858124
50,0.750972167059506,224.327882299282,147.30201835669,243.603529830416,103.105383948355
51,0.01828936588316,249.505131204334,114.794245180025,129.495085479016,408.195718175082
52,0.323325638910123,159.141681749234,106.854744390776,18.9019889656962,51.4307457794658
53,0.033770961308791,413.581373474192,154.408120689668,446.571947766101,435.968644308603
54,0.318264739192304,346.575691958707,59.8626851714252,255.289629539941,132.392312946497
55,0.543889052259968,202.50018301682,224.87814578565,179.824036025239,168.045578982369
56,0.014813028268087,317.664906479146,95.6823941971786,410.391814113528,449.004998805183
57,3.57717288413323,275.990345747377,445.847337469333,364.60493511239,475.71306458261
58,0.129900583191695,9.14924177359304,119.375334020565,113.361398805488,62.8300931374718
59,0.03708937574487,185.837293865833,447.695352621602,145.051135814477,160.694140439915
60,0.014921382861101,8.28959490938569,378.093007577705,419.707558105521,40.4024046726325
61,0.387351324110643,407.707347482472,350.199800459508,105.74924661113,253.972219444862
62,0.101466855479979,267.424013298673,386.705098956208,106.841281052243,212.004932409899
63,1.32736567001172,352.225865613491,171.568875244562,466.911865424454,130.806654602562
64,0.028663161770634,200.509116400279,185.054151659821,169.780882949394,426.355265958408
65,0.066319972191657,393.903835973502,34.1090298843032,395.993284870997,201.465690562591
66,0.225228846252684,416.977891536474,469.286103651892,451.235879905236,329.368398152194
67,0.193954759220393,161.654732137163,117.19778787807,386.605589800927,191.350615565409
68,0.096588543650903,207.153853909472,281.333900278231,463.836665364427,431.036779599936
69,0.045009258705634,363.180221118644,60.3413214970106,282.709764209504,263.181135410842
70,0.148522003805379,337.475883356403,345.712927332466,287.038267897121,198.123437087294
71,0.233773563579686,417.561141951304,416.699554349938,87.471372642944,284.442500963842
72,0.07632953740424,353.462065059428,230.244117781226,205.862394545593,418.718162036753
73,0.018751232608648,211.936255629827,38.9153036995522,335.407375291207,269.160151304954
74,0.11436186782933,232.953194819263,75.6969339038158,145.359684234586,179.190191924589
75,0.059780123967251,69.2355001498863,279.298667202486,382.963222385851,434.84703056805
76,0.039466512803061,423.250211589563,470.623951042526,385.799699148574,127.024253733708
77,0.012044591018025,208.006274730239,51.9283654736177,256.955959532126,347.239249164622
78,0.02529290143529,104.714857532854,304.9501964971,31.8389612251596,37.8811131918349
79,0.004302255370929,177.067793973296,28.3724394563165,331.479931132225,461.564224843564
80,0.074133627013002,158.134705180115,315.976143027337,278.395310237464,484.311241814557
81,0.160836802038602,410.048253861679,191.235924936736,470.978702738376,322.209828240428
82,2.01269810172184,405.219860759387,382.357826642821,340.408900681332,340.037356281025
83,0.086463232833669,465.637225155392,273.935550533945,471.461401666282,69.4129300775254
84,0.09652399673283,484.793856217189,217.858512463092,317.765365776244,30.5574828436997
85,25.7254804725824,82.523989196792,270.839083225059,174.362686576973,263.842713219115
86,3123.2782662272,106.094612132738,332.523075165983,43.7520305984393,333.205085763281
87,0.024585156837383,445.981783633524,66.2298255679999,373.905334245721,377.150351563984
88,0.018205881117995,117.196993636293,487.277963654347,133.617747939771,85.6568366996931
89,0.188996142204433,479.415773481536,87.8379455379654,429.859856289863,204.165337443809
90,0.030687409853583,324.976847605473,470.960628473335,126.942577378075,106.983488589713
91,0.084751033512141,234.705200183164,155.730168172949,303.535045799807,16.2640518096776
92,0.019959943675665,342.417666791063,8.85018592692246,287.691069761052,283.171709994183
93,0.017102517653105,162.236891091598,81.3657842047582,456.824872475328,318.421521204707
94,0.070128975496401,23.8513212365969,333.533751731515,196.322141219655,479.082443413362
95,0.006819280465836,151.095020172981,37.8615330871062,227.034115691539,362.755341229094
96,0.009406739334267,32.3147853544107,113.549008148151,57.9053526795503,348.470092929769
97,0.026975504059684,53.4863829718894,186.176691450922,56.7764485836142,371.957528066938
98,711.780196017338,7.36908228123383,488.268102038773,252.670421142526,486.698386703915
99,2.82416953708447,183.480683022873,368.758162863328,2.80315566798772,340.166678214112
100,0.3850029324009,482.322626243789,100.05861510573,495.618985557607,17.9764839910466
{
"desc_dim": 2,
"n_sis_select": 1,
"max_rung": 1,
"n_residual": 1,
"data_file": "data.csv",
"data_file_relatice_to_json": true,
"property_key": "Prop",
"leave_out_frac": 0.05,
"n_models_store": 1,
"calc_type": "log_regression",
"n_rung_generate": 1,
"max_feat_cross_correlation": 0.99,
"leave_out_inds": [0, 1, 2, 60, 61],
"opset": ["add", "sub", "abs_diff", "mult", "div", "inv", "abs", "exp", "log", "sin", "cos", "sq", "cb", "six_pow", "sqrt", "cbrt", "neg_exp"],
"param_opset": [],
"fix_intercept": false
}
from sissopp import ModelRegressor
from pathlib import Path
import numpy as np
model = ModelRegressor(
str("models/train_dim_2_model_0.dat")
)
assert model.rmse < 1e-4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment