Skip to content
Snippets Groups Projects
Commit 11044831 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Remove examples

Outdated, use the tutorial instead
parent 2724a70b
Branches
No related tags found
No related merge requests found
%% Cell type:code id: tags:
``` python
from cpp_sisso import generate_fs_sr_from_csv, Model
feat_sapce, sisso = generate_fs_sr_from_csv(
df="data.csv",
prop_key="energy_diff",
allowed_ops="all",
cols="all",
max_phi=2,
n_sis_select=100,
max_dim=3,
n_residuals=1,
task_key=None,
leave_out_frac=0.10,
)
```
%% Cell type:code id: tags:
``` python
sisso.fit()
```
%% Cell type:code id: tags:
``` python
import matplotlib.pyplot as plt
print([models[0].test_rmse for models in sisso.models])
plt.plot([1, 2, 3], [models[0].test_rmse for models in sisso.models])
```
%% Output
[0.21840220709133837, 0.1932239811232758, 0.1484061987754675]
[<matplotlib.lines.Line2D at 0x148ef1a968d0>]
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
from cpp_sisso import SISSOClassifier, generate_phi_0_from_csv, FeatureSpace
phi_0, prop_unit, prop, prop_test, task_sizes_train, task_sizes_test, leave_out_inds = generate_phi_0_from_csv(
"data.csv", "class", cols="all", task_key=None, leave_out_frac=0.0, leave_out_inds=None
)
# Load a feature space from a predefined text file
feat_space = FeatureSpace(
"phi.txt",
phi_0,
task_sizes_train,
"classification",
100,
1.0
)
sisso = SISSOClassifier(
feat_space,
prop_unit,
prop.astype(float),
prop_test.astype(float),
task_sizes_train,
task_sizes_test,
leave_out_inds,
2,
2,
2
)
```
%% Cell type:code id: tags:
``` python
sisso.fit()
```
%% Cell type:code id: tags:
``` python
import matplotlib.pyplot as plt
import numpy as np
model = sisso.models[1][1]
x_div = np.linspace(model.feats[1].value.min(), model.feats[1].value.max(), 101)
y_div = -1.0 * (model.coefs[0][1] * x_div + model.coefs[0][-1]) / model.coefs[0][0]
x_range = model.feats[1].value.max() - model.feats[1].value.min()
y_range = model.feats[0].value.max() - model.feats[0].value.min()
plt.plot(model.feats[1].value[:41], model.feats[0].value[:41], ".")
plt.plot(model.feats[1].value[41:], model.feats[0].value[41:], ".")
plt.plot(x_div, y_div)
plt.xlim([model.feats[1].value.min() - 0.05 * x_range, model.feats[1].value.max() + 0.05 * x_range])
plt.ylim([model.feats[0].value.min() - 0.05 * y_range, model.feats[0].value.max() + 0.05 * y_range])
plt.xlabel("D1")
plt.ylabel("D2")
plt.show()
```
%% Cell type:code id: tags:
``` python
```
,purcell,theobook151,27.09.2020 10:48,file:///home/purcell/.config/libreoffice/4;
\ No newline at end of file
Material,class,Z_A (nuc_charge),Z_B (nuc_charge),period_A (Unitless),period_B (Unitless),IP_A (eV_IP),IP_B (eV_IP),EA_A (eV_IP),EA_B (eV_IP),E_HOMO_A (eV),E_HOMO_B (eV),E_LUMO_A (eV),E_LUMO_B (eV),rs_A,rs_B,rp_A,rp_B,rd_A,rd_B
AgBr,-1,47,35,5,4,-8.0580997467,-12.649600029,-1.66659998894,-3.73930001259,-4.71000003815,-8.00100040436,-0.479000002146,0.708000004292,1.32000005245,0.75,1.87999999523,0.879999995232,2.97000002861,1.87000000477
AgCl,-1,47,17,5,3,-8.0580997467,-13.9018001556,-1.66659998894,-3.97079992294,-4.71000003815,-8.69999980927,-0.479000002146,0.574000000954,1.32000005245,0.680000007153,1.87999999523,0.759999990463,2.97000002861,1.66999995708
AgF,-1,47,9,5,2,-8.0580997467,-19.4043006897,-1.66659998894,-4.27349996567,-4.71000003815,-11.2939996719,-0.479000002146,1.25100004673,1.32000005245,0.409999996424,1.87999999523,0.370000004768,2.97000002861,1.42999994755
BaO,-1,56,8,6,2,-5.51569986343,-16.4332008362,0.277999997139,-3.00589990616,-3.34599995613,-9.19699954987,-2.1289999485,2.54099988937,2.15000009537,0.460000008345,2.63000011444,0.430000007153,1.35000002384,2.22000002861
BaS,-1,56,16,6,3,-5.51569986343,-11.7951002121,0.277999997139,-2.84489989281,-3.34599995613,-7.10599994659,-2.1289999485,0.64200001955,2.15000009537,0.740000009537,2.63000011444,0.850000023842,1.35000002384,2.36999988556
BaSe,-1,56,34,6,4,-5.51569986343,-10.9460000992,0.277999997139,-2.75099992752,-3.34599995613,-6.65399980545,-2.1289999485,1.31599998474,2.15000009537,0.800000011921,2.63000011444,0.949999988079,1.35000002384,2.18000006676
BaTe,-1,56,52,6,5,-5.51569986343,-9.86670017242,0.277999997139,-2.66599988937,-3.34599995613,-6.10900020599,-2.1289999485,0.0989999994636,2.15000009537,0.939999997616,2.63000011444,1.13999998569,1.35000002384,1.83000004292
CaO,-1,20,8,4,2,-6.4279999733,-16.4332008362,0.303900003433,-3.00589990616,-3.86400008202,-9.19699954987,-2.132999897,2.54099988937,1.75999999046,0.460000008345,2.31999993324,0.430000007153,0.680000007153,2.22000002861
CaS,-1,20,16,4,3,-6.4279999733,-11.7951002121,0.303900003433,-2.84489989281,-3.86400008202,-7.10599994659,-2.132999897,0.64200001955,1.75999999046,0.740000009537,2.31999993324,0.850000023842,0.680000007153,2.36999988556
CaSe,-1,20,34,4,4,-6.4279999733,-10.9460000992,0.303900003433,-2.75099992752,-3.86400008202,-6.65399980545,-2.132999897,1.31599998474,1.75999999046,0.800000011921,2.31999993324,0.949999988079,0.680000007153,2.18000006676
CaTe,-1,20,52,4,5,-6.4279999733,-9.86670017242,0.303900003433,-2.66599988937,-3.86400008202,-6.10900020599,-2.132999897,0.0989999994636,1.75999999046,0.939999997616,2.31999993324,1.13999998569,0.680000007153,1.83000004292
CdO,-1,48,8,5,2,-9.5813999176,-16.4332008362,0.838699996471,-3.00589990616,-5.95200014114,-9.19699954987,-1.30900001526,2.54099988937,1.23000001907,0.460000008345,1.74000000954,0.430000007153,2.59999990463,2.22000002861
BrCs,-1,55,35,6,4,-4.00619983673,-12.649600029,-0.569599986076,-3.73930001259,-2.22000002861,-8.00100040436,-0.547999978065,0.708000004292,2.46000003815,0.75,3.16000008583,0.879999995232,1.97000002861,1.87000000477
ClCs,-1,55,17,6,3,-4.00619983673,-13.9018001556,-0.569599986076,-3.97079992294,-2.22000002861,-8.69999980927,-0.547999978065,0.574000000954,2.46000003815,0.680000007153,3.16000008583,0.759999990463,1.97000002861,1.66999995708
CsF,-1,55,9,6,2,-4.00619983673,-19.4043006897,-0.569599986076,-4.27349996567,-2.22000002861,-11.2939996719,-0.547999978065,1.25100004673,2.46000003815,0.409999996424,3.16000008583,0.370000004768,1.97000002861,1.42999994755
CsI,-1,55,53,6,5,-4.00619983673,-11.2571001053,-0.569599986076,-3.5134999752,-2.22000002861,-7.23600006104,-0.547999978065,0.212999999523,2.46000003815,0.899999976158,3.16000008583,1.07000005245,1.97000002861,1.72000002861
CuF,-1,29,9,4,2,-8.38879966736,-19.4043006897,-1.6384999752,-4.27349996567,-4.85599994659,-11.2939996719,-0.64099997282,1.25100004673,1.20000004768,0.409999996424,1.67999994755,0.370000004768,2.57999992371,1.42999994755
BrK,-1,19,35,4,4,-4.43319988251,-12.649600029,-0.621299982071,-3.73930001259,-2.42600011826,-8.00100040436,-0.697000026703,0.708000004292,2.13000011444,0.75,2.44000005722,0.879999995232,1.78999996185,1.87000000477
ClK,-1,19,17,4,3,-4.43319988251,-13.9018001556,-0.621299982071,-3.97079992294,-2.42600011826,-8.69999980927,-0.697000026703,0.574000000954,2.13000011444,0.680000007153,2.44000005722,0.759999990463,1.78999996185,1.66999995708
FK,-1,19,9,4,2,-4.43319988251,-19.4043006897,-0.621299982071,-4.27349996567,-2.42600011826,-11.2939996719,-0.697000026703,1.25100004673,2.13000011444,0.409999996424,2.44000005722,0.370000004768,1.78999996185,1.42999994755
IK,-1,19,53,4,5,-4.43319988251,-11.2571001053,-0.621299982071,-3.5134999752,-2.42600011826,-7.23600006104,-0.697000026703,0.212999999523,2.13000011444,0.899999976158,2.44000005722,1.07000005245,1.78999996185,1.72000002861
BrLi,-1,3,35,2,4,-5.32910013199,-12.649600029,-0.698099970818,-3.73930001259,-2.87400007248,-8.00100040436,-0.977999985218,0.708000004292,1.64999997616,0.75,2,0.879999995232,6.92999982834,1.87000000477
ClLi,-1,3,17,2,3,-5.32910013199,-13.9018001556,-0.698099970818,-3.97079992294,-2.87400007248,-8.69999980927,-0.977999985218,0.574000000954,1.64999997616,0.680000007153,2,0.759999990463,6.92999982834,1.66999995708
FLi,-1,3,9,2,2,-5.32910013199,-19.4043006897,-0.698099970818,-4.27349996567,-2.87400007248,-11.2939996719,-0.977999985218,1.25100004673,1.64999997616,0.409999996424,2,0.370000004768,6.92999982834,1.42999994755
ILi,-1,3,53,2,5,-5.32910013199,-11.2571001053,-0.698099970818,-3.5134999752,-2.87400007248,-7.23600006104,-0.977999985218,0.212999999523,1.64999997616,0.899999976158,2,1.07000005245,6.92999982834,1.72000002861
MgO,-1,12,8,3,2,-8.03709983826,-16.4332008362,0.692499995232,-3.00589990616,-4.78200006485,-9.19699954987,-1.35800004005,2.54099988937,1.33000004292,0.460000008345,1.89999997616,0.430000007153,3.17000007629,2.22000002861
MgS,-1,12,16,3,3,-8.03709983826,-11.7951002121,0.692499995232,-2.84489989281,-4.78200006485,-7.10599994659,-1.35800004005,0.64200001955,1.33000004292,0.740000009537,1.89999997616,0.850000023842,3.17000007629,2.36999988556
MgSe,-1,12,34,3,4,-8.03709983826,-10.9460000992,0.692499995232,-2.75099992752,-4.78200006485,-6.65399980545,-1.35800004005,1.31599998474,1.33000004292,0.800000011921,1.89999997616,0.949999988079,3.17000007629,2.18000006676
MgTe,-1,12,52,3,5,-8.03709983826,-9.86670017242,0.692499995232,-2.66599988937,-4.78200006485,-6.10900020599,-1.35800004005,0.0989999994636,1.33000004292,0.939999997616,1.89999997616,1.13999998569,3.17000007629,1.83000004292
BrNa,-1,11,35,3,4,-5.22310018539,-12.649600029,-0.715699970722,-3.73930001259,-2.81900000572,-8.00100040436,-0.717999994755,0.708000004292,1.71000003815,0.75,2.59999990463,0.879999995232,6.57000017166,1.87000000477
ClNa,-1,11,17,3,3,-5.22310018539,-13.9018001556,-0.715699970722,-3.97079992294,-2.81900000572,-8.69999980927,-0.717999994755,0.574000000954,1.71000003815,0.680000007153,2.59999990463,0.759999990463,6.57000017166,1.66999995708
FNa,-1,11,9,3,2,-5.22310018539,-19.4043006897,-0.715699970722,-4.27349996567,-2.81900000572,-11.2939996719,-0.717999994755,1.25100004673,1.71000003815,0.409999996424,2.59999990463,0.370000004768,6.57000017166,1.42999994755
INa,-1,11,53,3,5,-5.22310018539,-11.2571001053,-0.715699970722,-3.5134999752,-2.81900000572,-7.23600006104,-0.717999994755,0.212999999523,1.71000003815,0.899999976158,2.59999990463,1.07000005245,6.57000017166,1.72000002861
BrRb,-1,37,35,5,4,-4.28889989853,-12.649600029,-0.590399980545,-3.73930001259,-2.3599998951,-8.00100040436,-0.704999983311,0.708000004292,2.24000000954,0.75,3.20000004768,0.879999995232,1.96000003815,1.87000000477
ClRb,-1,37,17,5,3,-4.28889989853,-13.9018001556,-0.590399980545,-3.97079992294,-2.3599998951,-8.69999980927,-0.704999983311,0.574000000954,2.24000000954,0.680000007153,3.20000004768,0.759999990463,1.96000003815,1.66999995708
FRb,-1,37,9,5,2,-4.28889989853,-19.4043006897,-0.590399980545,-4.27349996567,-2.3599998951,-11.2939996719,-0.704999983311,1.25100004673,2.24000000954,0.409999996424,3.20000004768,0.370000004768,1.96000003815,1.42999994755
IRb,-1,37,53,5,5,-4.28889989853,-11.2571001053,-0.590399980545,-3.5134999752,-2.3599998951,-7.23600006104,-0.704999983311,0.212999999523,2.24000000954,0.899999976158,3.20000004768,1.07000005245,1.96000003815,1.72000002861
OSr,-1,38,8,5,2,-6.03159999847,-16.4332008362,0.343100011349,-3.00589990616,-3.64100003242,-9.19699954987,-1.3789999485,2.54099988937,1.90999996662,0.460000008345,2.54999995232,0.430000007153,1.20000004768,2.22000002861
SSr,-1,38,16,5,3,-6.03159999847,-11.7951002121,0.343100011349,-2.84489989281,-3.64100003242,-7.10599994659,-1.3789999485,0.64200001955,1.90999996662,0.740000009537,2.54999995232,0.850000023842,1.20000004768,2.36999988556
SeSr,-1,38,34,5,4,-6.03159999847,-10.9460000992,0.343100011349,-2.75099992752,-3.64100003242,-6.65399980545,-1.3789999485,1.31599998474,1.90999996662,0.800000011921,2.54999995232,0.949999988079,1.20000004768,2.18000006676
SrTe,-1,38,52,5,5,-6.03159999847,-9.86670017242,0.343100011349,-2.66599988937,-3.64100003242,-6.10900020599,-1.3789999485,0.0989999994636,1.90999996662,0.939999997616,2.54999995232,1.13999998569,1.20000004768,1.83000004292
AgI,1,47,53,5,5,-8.0580997467,-11.2571001053,-1.66659998894,-3.5134999752,-4.71000003815,-7.23600006104,-0.479000002146,0.212999999523,1.32000005245,0.899999976158,1.87999999523,1.07000005245,2.97000002861,1.72000002861
AlAs,1,13,33,3,4,-5.78049993515,-9.26189994812,-0.3125,-1.83920001984,-2.78399991989,-5.34100008011,0.694999992847,0.0640000030398,1.09000003338,0.850000023842,1.38999998569,1.03999996185,1.94000005722,2.01999998093
AlN,1,13,7,3,2,-5.78049993515,-13.5852003098,-0.3125,-1.86749994755,-2.78399991989,-7.2389998436,0.694999992847,3.0569999218,1.09000003338,0.540000021458,1.38999998569,0.509999990463,1.94000005722,1.53999996185
AlP,1,13,15,3,3,-5.78049993515,-9.75059986115,-0.3125,-1.91999995708,-2.78399991989,-5.59600019455,0.694999992847,0.182999998331,1.09000003338,0.829999983311,1.38999998569,0.97000002861,1.94000005722,1.76999998093
AlSb,1,13,51,3,5,-5.78049993515,-8.46829986572,-0.3125,-1.84669995308,-2.78399991989,-4.99100017548,0.694999992847,0.104999996722,1.09000003338,1,1.38999998569,1.23000001907,1.94000005722,2.05999994278
AsGa,1,31,33,4,4,-5.81820011139,-9.26189994812,-0.108099997044,-1.83920001984,-2.73200011253,-5.34100008011,0.129999995232,0.0640000030398,0.990000009537,0.850000023842,1.33000004292,1.03999996185,2.16000008583,2.01999998093
AsB,1,5,33,2,4,-8.18999958038,-9.26189994812,-0.107400000095,-1.83920001984,-3.71499991417,-5.34100008011,2.24799990654,0.0640000030398,0.810000002384,0.850000023842,0.829999983311,1.03999996185,1.95000004768,2.01999998093
BN,1,5,7,2,2,-8.18999958038,-13.5852003098,-0.107400000095,-1.86749994755,-3.71499991417,-7.2389998436,2.24799990654,3.0569999218,0.810000002384,0.540000021458,0.829999983311,0.509999990463,1.95000004768,1.53999996185
BP,1,5,15,2,3,-8.18999958038,-9.75059986115,-0.107400000095,-1.91999995708,-3.71499991417,-5.59600019455,2.24799990654,0.182999998331,0.810000002384,0.829999983311,0.829999983311,0.97000002861,1.95000004768,1.76999998093
BSb,1,5,51,2,5,-8.18999958038,-8.46829986572,-0.107400000095,-1.84669995308,-3.71499991417,-4.99100017548,2.24799990654,0.104999996722,0.810000002384,1,0.829999983311,1.23000001907,1.95000004768,2.05999994278
BeO,1,4,8,2,2,-9.459400177,-16.4332008362,0.630500018597,-3.00589990616,-5.59999990463,-9.19699954987,-2.09800004959,2.54099988937,1.08000004292,0.460000008345,1.21000003815,0.430000007153,2.88000011444,2.22000002861
BeS,1,4,16,2,3,-9.459400177,-11.7951002121,0.630500018597,-2.84489989281,-5.59999990463,-7.10599994659,-2.09800004959,0.64200001955,1.08000004292,0.740000009537,1.21000003815,0.850000023842,2.88000011444,2.36999988556
BeSe,1,4,34,2,4,-9.459400177,-10.9460000992,0.630500018597,-2.75099992752,-5.59999990463,-6.65399980545,-2.09800004959,1.31599998474,1.08000004292,0.800000011921,1.21000003815,0.949999988079,2.88000011444,2.18000006676
BeTe,1,4,52,2,5,-9.459400177,-9.86670017242,0.630500018597,-2.66599988937,-5.59999990463,-6.10900020599,-2.09800004959,0.0989999994636,1.08000004292,0.939999997616,1.21000003815,1.13999998569,2.88000011444,1.83000004292
C2,1,6,6,2,2,-10.8516998291,-10.8516998291,-0.87239998579,-0.87239998579,-5.41599988937,-5.41599988937,1.99199998379,1.99199998379,0.639999985695,0.639999985695,0.629999995232,0.629999995232,1.62999999523,1.62999999523
CdS,1,48,16,5,3,-9.5813999176,-11.7951002121,0.838699996471,-2.84489989281,-5.95200014114,-7.10599994659,-1.30900001526,0.64200001955,1.23000001907,0.740000009537,1.74000000954,0.850000023842,2.59999990463,2.36999988556
CdSe,1,48,34,5,4,-9.5813999176,-10.9460000992,0.838699996471,-2.75099992752,-5.95200014114,-6.65399980545,-1.30900001526,1.31599998474,1.23000001907,0.800000011921,1.74000000954,0.949999988079,2.59999990463,2.18000006676
CdTe,1,48,52,5,5,-9.5813999176,-9.86670017242,0.838699996471,-2.66599988937,-5.95200014114,-6.10900020599,-1.30900001526,0.0989999994636,1.23000001907,0.939999997616,1.74000000954,1.13999998569,2.59999990463,1.83000004292
BrCu,1,29,35,4,4,-8.38879966736,-12.649600029,-1.6384999752,-3.73930001259,-4.85599994659,-8.00100040436,-0.64099997282,0.708000004292,1.20000004768,0.75,1.67999994755,0.879999995232,2.57999992371,1.87000000477
ClCu,1,29,17,4,3,-8.38879966736,-13.9018001556,-1.6384999752,-3.97079992294,-4.85599994659,-8.69999980927,-0.64099997282,0.574000000954,1.20000004768,0.680000007153,1.67999994755,0.759999990463,2.57999992371,1.66999995708
CuI,1,29,53,4,5,-8.38879966736,-11.2571001053,-1.6384999752,-3.5134999752,-4.85599994659,-7.23600006104,-0.64099997282,0.212999999523,1.20000004768,0.899999976158,1.67999994755,1.07000005245,2.57999992371,1.72000002861
GaN,1,31,7,4,2,-5.81820011139,-13.5852003098,-0.108099997044,-1.86749994755,-2.73200011253,-7.2389998436,0.129999995232,3.0569999218,0.990000009537,0.540000021458,1.33000004292,0.509999990463,2.16000008583,1.53999996185
GaP,1,31,15,4,3,-5.81820011139,-9.75059986115,-0.108099997044,-1.91999995708,-2.73200011253,-5.59600019455,0.129999995232,0.182999998331,0.990000009537,0.829999983311,1.33000004292,0.97000002861,2.16000008583,1.76999998093
GaSb,1,31,51,4,5,-5.81820011139,-8.46829986572,-0.108099997044,-1.84669995308,-2.73200011253,-4.99100017548,0.129999995232,0.104999996722,0.990000009537,1,1.33000004292,1.23000001907,2.16000008583,2.05999994278
Ge2,1,32,32,4,4,-7.56699991226,-7.56699991226,-0.949000000954,-0.949000000954,-4.04600000381,-4.04600000381,2.17499995232,2.17499995232,0.920000016689,0.920000016689,1.15999996662,1.15999996662,2.36999988556,2.36999988556
CGe,1,32,6,4,2,-7.56699991226,-10.8516998291,-0.949000000954,-0.87239998579,-4.04600000381,-5.41599988937,2.17499995232,1.99199998379,0.920000016689,0.639999985695,1.15999996662,0.629999995232,2.36999988556,1.62999999523
GeSi,1,32,14,4,3,-7.56699991226,-7.75769996643,-0.949000000954,-0.992999970913,-4.04600000381,-4.16300010681,2.17499995232,0.439999997616,0.920000016689,0.939999997616,1.15999996662,1.12999999523,2.36999988556,1.88999998569
AsIn,1,49,33,5,4,-5.53739976883,-9.26189994812,-0.256300002337,-1.83920001984,-2.6970000267,-5.34100008011,0.368000000715,0.0640000030398,1.12999999523,0.850000023842,1.5,1.03999996185,3.1099998951,2.01999998093
InN,1,49,7,5,2,-5.53739976883,-13.5852003098,-0.256300002337,-1.86749994755,-2.6970000267,-7.2389998436,0.368000000715,3.0569999218,1.12999999523,0.540000021458,1.5,0.509999990463,3.1099998951,1.53999996185
InP,1,49,15,5,3,-5.53739976883,-9.75059986115,-0.256300002337,-1.91999995708,-2.6970000267,-5.59600019455,0.368000000715,0.182999998331,1.12999999523,0.829999983311,1.5,0.97000002861,3.1099998951,1.76999998093
InSb,1,49,51,5,5,-5.53739976883,-8.46829986572,-0.256300002337,-1.84669995308,-2.6970000267,-4.99100017548,0.368000000715,0.104999996722,1.12999999523,1,1.5,1.23000001907,3.1099998951,2.05999994278
Si2,1,14,14,3,3,-7.75769996643,-7.75769996643,-0.992999970913,-0.992999970913,-4.16300010681,-4.16300010681,0.439999997616,0.439999997616,0.939999997616,0.939999997616,1.12999999523,1.12999999523,1.88999998569,1.88999998569
CSi,1,14,6,3,2,-7.75769996643,-10.8516998291,-0.992999970913,-0.87239998579,-4.16300010681,-5.41599988937,0.439999997616,1.99199998379,0.939999997616,0.639999985695,1.12999999523,0.629999995232,1.88999998569,1.62999999523
Sn2,1,50,50,5,5,-7.04279994965,-7.04279994965,-1.03919994831,-1.03919994831,-3.86599993706,-3.86599993706,0.00800000037998,0.00800000037998,1.05999994278,1.05999994278,1.34000003338,1.34000003338,2.02999997139,2.02999997139
CSn,1,50,6,5,2,-7.04279994965,-10.8516998291,-1.03919994831,-0.87239998579,-3.86599993706,-5.41599988937,0.00800000037998,1.99199998379,1.05999994278,0.639999985695,1.34000003338,0.629999995232,2.02999997139,1.62999999523
GeSn,1,50,32,5,4,-7.04279994965,-7.56699991226,-1.03919994831,-0.949000000954,-3.86599993706,-4.04600000381,0.00800000037998,2.17499995232,1.05999994278,0.920000016689,1.34000003338,1.15999996662,2.02999997139,2.36999988556
SiSn,1,50,14,5,3,-7.04279994965,-7.75769996643,-1.03919994831,-0.992999970913,-3.86599993706,-4.16300010681,0.00800000037998,0.439999997616,1.05999994278,0.939999997616,1.34000003338,1.12999999523,2.02999997139,1.88999998569
OZn,1,30,8,4,2,-10.1354999542,-16.4332008362,1.08070003986,-3.00589990616,-6.21700000763,-9.19699954987,-1.19400000572,2.54099988937,1.10000002384,0.460000008345,1.54999995232,0.430000007153,2.25,2.22000002861
SZn,1,30,16,4,3,-10.1354999542,-11.7951002121,1.08070003986,-2.84489989281,-6.21700000763,-7.10599994659,-1.19400000572,0.64200001955,1.10000002384,0.740000009537,1.54999995232,0.850000023842,2.25,2.36999988556
SeZn,1,30,34,4,4,-10.1354999542,-10.9460000992,1.08070003986,-2.75099992752,-6.21700000763,-6.65399980545,-1.19400000572,1.31599998474,1.10000002384,0.800000011921,1.54999995232,0.949999988079,2.25,2.18000006676
TeZn,1,30,52,4,5,-10.1354999542,-9.86670017242,1.08070003986,-2.66599988937,-6.21700000763,-6.10900020599,-1.19400000572,0.0989999994636,1.10000002384,0.939999997616,1.54999995232,1.13999998569,2.25,1.83000004292
This diff is collapsed.
%% Cell type:code id: tags:
``` python
from cpp_sisso import SISSOClassifier, generate_phi_0_from_csv, FeatureSpace
phi_0, prop_unit, prop, prop_test, task_sizes_train, task_sizes_test, leave_out_inds = generate_phi_0_from_csv(
"data.csv", "class", cols="all", task_key=None, leave_out_frac=0.0, leave_out_inds=None
)
# Load a feature space from a predefined text file
feat_space = FeatureSpace(
"phi.txt",
phi_0,
task_sizes_train,
"classification",
100,
1.0
)
sisso = SISSOClassifier(
feat_space,
prop_unit,
prop.astype(float),
prop_test.astype(float),
task_sizes_train,
task_sizes_test,
leave_out_inds,
2,
2,
2
)
```
%% Cell type:code id: tags:
``` python
sisso.fit()
```
%% Cell type:code id: tags:
``` python
import matplotlib.pyplot as plt
import numpy as np
model = sisso.models[1][1]
x_div = np.linspace(model.feats[1].value.min(), model.feats[1].value.max(), 101)
y_div = -1.0 * (model.coefs[0][1] * x_div + model.coefs[0][-1]) / model.coefs[0][0]
x_range = model.feats[1].value.max() - model.feats[1].value.min()
y_range = model.feats[0].value.max() - model.feats[0].value.min()
plt.plot(model.feats[1].value[:41], model.feats[0].value[:41], ".")
plt.plot(model.feats[1].value[41:], model.feats[0].value[41:], ".")
plt.plot(x_div, y_div)
plt.xlim([model.feats[1].value.min() - 0.05 * x_range, model.feats[1].value.max() + 0.05 * x_range])
plt.ylim([model.feats[0].value.min() - 0.05 * y_range, model.feats[0].value.max() + 0.05 * y_range])
plt.xlabel("D1")
plt.ylabel("D2")
plt.show()
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
from cpp_sisso import generate_fs_sr_from_csv, Model
feat_sapce, sisso = generate_fs_sr_from_csv(
df_csv="data.csv",
prop_key="energy_diff",
allowed_ops="all",
allowed_param_ops={"sq": ["a"]},
cols="all",
max_phi=2,
n_sis_select=20,
max_dim=4,
n_residuals=1,
task_key=None,
leave_out_frac=0.10,
)
```
%% Cell type:code id: tags:
``` python
sisso.fit()
```
%% Cell type:code id: tags:
``` python
import matplotlib.pyplot as plt
print([models[0].test_rmse for models in sisso.models])
plt.plot([1, 2, 3, 4], [models[0].test_rmse for models in sisso.models])
```
%% Output
[0.11627796110162385, 0.05283163886632445, 0.04425093435527103, 0.04080410461333008]
[<matplotlib.lines.Line2D at 0x1481b08062b0>]
%% Cell type:code id: tags:
``` python
print(sisso.feat_space.phi_selected[8])
```
%% Output
[((1.000000*r_s_A + -1.753045)^2) / (1.000000*[(1.000000*r_p_A) * (r_s_B)] + 0.000000)]
%% Cell type:code id: tags:
``` python
```
Material,energy_diff (eV),Z_A (elem_charge),Z_B (elem_charge),period_A (Unitless),period_B (Unitless),IP_A (eV),IP_B (eV),EA_A (eV),EA_B (eV),E_HOMO_A (eV),E_HOMO_B (eV),E_LUMO_A (eV),E_LUMO_B (eV),r_s_A (AA),r_s_B (AA),r_p_A (AA),r_p_B (AA),r_d_A (AA),r_d_B (AA)
AgBr,-0.030033416711376,47,35,5,4,-8.0580997467,-12.649600029,-1.66659998894,-3.73930001259,-4.71000003815,-8.00100040436,-0.479000002146,0.708000004292,1.32000005245,0.75,1.87999999523,0.879999995232,2.97000002861,1.87000000477
AgCl,-0.042797278205399,47,17,5,3,-8.0580997467,-13.9018001556,-1.66659998894,-3.97079992294,-4.71000003815,-8.69999980927,-0.479000002146,0.574000000954,1.32000005245,0.680000007153,1.87999999523,0.759999990463,2.97000002861,1.66999995708
AgF,-0.153757673178916,47,9,5,2,-8.0580997467,-19.4043006897,-1.66659998894,-4.27349996567,-4.71000003815,-11.2939996719,-0.479000002146,1.25100004673,1.32000005245,0.409999996424,1.87999999523,0.370000004768,2.97000002861,1.42999994755
AgI,0.036925419641193,47,53,5,5,-8.0580997467,-11.2571001053,-1.66659998894,-3.5134999752,-4.71000003815,-7.23600006104,-0.479000002146,0.212999999523,1.32000005245,0.899999976158,1.87999999523,1.07000005245,2.97000002861,1.72000002861
AlAs,0.213261849108676,13,33,3,4,-5.78049993515,-9.26189994812,-0.3125,-1.83920001984,-2.78399991989,-5.34100008011,0.694999992847,0.0640000030398,1.09000003338,0.850000023842,1.38999998569,1.03999996185,1.94000005722,2.01999998093
AlN,0.072949073169639,13,7,3,2,-5.78049993515,-13.5852003098,-0.3125,-1.86749994755,-2.78399991989,-7.2389998436,0.694999992847,3.0569999218,1.09000003338,0.540000021458,1.38999998569,0.509999990463,1.94000005722,1.53999996185
AlP,0.218958341475627,13,15,3,3,-5.78049993515,-9.75059986115,-0.3125,-1.91999995708,-2.78399991989,-5.59600019455,0.694999992847,0.182999998331,1.09000003338,0.829999983311,1.38999998569,0.97000002861,1.94000005722,1.76999998093
AlSb,0.156868733960437,13,51,3,5,-5.78049993515,-8.46829986572,-0.3125,-1.84669995308,-2.78399991989,-4.99100017548,0.694999992847,0.104999996722,1.09000003338,1,1.38999998569,1.23000001907,1.94000005722,2.05999994278
AsGa,0.274277772419737,31,33,4,4,-5.81820011139,-9.26189994812,-0.108099997044,-1.83920001984,-2.73200011253,-5.34100008011,0.129999995232,0.0640000030398,0.990000009537,0.850000023842,1.33000004292,1.03999996185,2.16000008583,2.01999998093
AsB,0.874978183765052,5,33,2,4,-8.18999958038,-9.26189994812,-0.107400000095,-1.83920001984,-3.71499991417,-5.34100008011,2.24799990654,0.0640000030398,0.810000002384,0.850000023842,0.829999983311,1.03999996185,1.95000004768,2.01999998093
BN,1.71208026083627,5,7,2,2,-8.18999958038,-13.5852003098,-0.107400000095,-1.86749994755,-3.71499991417,-7.2389998436,2.24799990654,3.0569999218,0.810000002384,0.540000021458,0.829999983311,0.509999990463,1.95000004768,1.53999996185
BP,1.01922516119521,5,15,2,3,-8.18999958038,-9.75059986115,-0.107400000095,-1.91999995708,-3.71499991417,-5.59600019455,2.24799990654,0.182999998331,0.810000002384,0.829999983311,0.829999983311,0.97000002861,1.95000004768,1.76999998093
BSb,0.580849114368903,5,51,2,5,-8.18999958038,-8.46829986572,-0.107400000095,-1.84669995308,-3.71499991417,-4.99100017548,2.24799990654,0.104999996722,0.810000002384,1,0.829999983311,1.23000001907,1.95000004768,2.05999994278
BaO,-0.092998553867801,56,8,6,2,-5.51569986343,-16.4332008362,0.277999997139,-3.00589990616,-3.34599995613,-9.19699954987,-2.1289999485,2.54099988937,2.15000009537,0.460000008345,2.63000011444,0.430000007153,1.35000002384,2.22000002861
BaS,-0.319762429426191,56,16,6,3,-5.51569986343,-11.7951002121,0.277999997139,-2.84489989281,-3.34599995613,-7.10599994659,-2.1289999485,0.64200001955,2.15000009537,0.740000009537,2.63000011444,0.850000023842,1.35000002384,2.36999988556
BaSe,-0.343445134087233,56,34,6,4,-5.51569986343,-10.9460000992,0.277999997139,-2.75099992752,-3.34599995613,-6.65399980545,-2.1289999485,1.31599998474,2.15000009537,0.800000011921,2.63000011444,0.949999988079,1.35000002384,2.18000006676
BaTe,-0.375386809668271,56,52,6,5,-5.51569986343,-9.86670017242,0.277999997139,-2.66599988937,-3.34599995613,-6.10900020599,-2.1289999485,0.0989999994636,2.15000009537,0.939999997616,2.63000011444,1.13999998569,1.35000002384,1.83000004292
BeO,0.691837577232946,4,8,2,2,-9.459400177,-16.4332008362,0.630500018597,-3.00589990616,-5.59999990463,-9.19699954987,-2.09800004959,2.54099988937,1.08000004292,0.460000008345,1.21000003815,0.430000007153,2.88000011444,2.22000002861
BeS,0.506327674543172,4,16,2,3,-9.459400177,-11.7951002121,0.630500018597,-2.84489989281,-5.59999990463,-7.10599994659,-2.09800004959,0.64200001955,1.08000004292,0.740000009537,1.21000003815,0.850000023842,2.88000011444,2.36999988556
BeSe,0.49494044277526,4,34,2,4,-9.459400177,-10.9460000992,0.630500018597,-2.75099992752,-5.59999990463,-6.65399980545,-2.09800004959,1.31599998474,1.08000004292,0.800000011921,1.21000003815,0.949999988079,2.88000011444,2.18000006676
BeTe,0.468585910493857,4,52,2,5,-9.459400177,-9.86670017242,0.630500018597,-2.66599988937,-5.59999990463,-6.10900020599,-2.09800004959,0.0989999994636,1.08000004292,0.939999997616,1.21000003815,1.13999998569,2.88000011444,1.83000004292
C2,2.62860363913364,6,6,2,2,-10.8516998291,-10.8516998291,-0.87239998579,-0.87239998579,-5.41599988937,-5.41599988937,1.99199998379,1.99199998379,0.639999985695,0.639999985695,0.629999995232,0.629999995232,1.62999999523,1.62999999523
CaO,-0.265219041319142,20,8,4,2,-6.4279999733,-16.4332008362,0.303900003433,-3.00589990616,-3.86400008202,-9.19699954987,-2.132999897,2.54099988937,1.75999999046,0.460000008345,2.31999993324,0.430000007153,0.680000007153,2.22000002861
CaS,-0.369133194537426,20,16,4,3,-6.4279999733,-11.7951002121,0.303900003433,-2.84489989281,-3.86400008202,-7.10599994659,-2.132999897,0.64200001955,1.75999999046,0.740000009537,2.31999993324,0.850000023842,0.680000007153,2.36999988556
CaSe,-0.360797734421794,20,34,4,4,-6.4279999733,-10.9460000992,0.303900003433,-2.75099992752,-3.86400008202,-6.65399980545,-2.132999897,1.31599998474,1.75999999046,0.800000011921,2.31999993324,0.949999988079,0.680000007153,2.18000006676
CaTe,-0.350456279076752,20,52,4,5,-6.4279999733,-9.86670017242,0.303900003433,-2.66599988937,-3.86400008202,-6.10900020599,-2.132999897,0.0989999994636,1.75999999046,0.939999997616,2.31999993324,1.13999998569,0.680000007153,1.83000004292
CdO,-0.084161358026904,48,8,5,2,-9.5813999176,-16.4332008362,0.838699996471,-3.00589990616,-5.95200014114,-9.19699954987,-1.30900001526,2.54099988937,1.23000001907,0.460000008345,1.74000000954,0.430000007153,2.59999990463,2.22000002861
CdS,0.072672795911785,48,16,5,3,-9.5813999176,-11.7951002121,0.838699996471,-2.84489989281,-5.95200014114,-7.10599994659,-1.30900001526,0.64200001955,1.23000001907,0.740000009537,1.74000000954,0.850000023842,2.59999990463,2.36999988556
CdSe,0.083571949086036,48,34,5,4,-9.5813999176,-10.9460000992,0.838699996471,-2.75099992752,-5.95200014114,-6.65399980545,-1.30900001526,1.31599998474,1.23000001907,0.800000011921,1.74000000954,0.949999988079,2.59999990463,2.18000006676
CdTe,0.114539532194613,48,52,5,5,-9.5813999176,-9.86670017242,0.838699996471,-2.66599988937,-5.95200014114,-6.10900020599,-1.30900001526,0.0989999994636,1.23000001907,0.939999997616,1.74000000954,1.13999998569,2.59999990463,1.83000004292
BrCs,-0.155867302994011,55,35,6,4,-4.00619983673,-12.649600029,-0.569599986076,-3.73930001259,-2.22000002861,-8.00100040436,-0.547999978065,0.708000004292,2.46000003815,0.75,3.16000008583,0.879999995232,1.97000002861,1.87000000477
ClCs,-0.15034615744662,55,17,6,3,-4.00619983673,-13.9018001556,-0.569599986076,-3.97079992294,-2.22000002861,-8.69999980927,-0.547999978065,0.574000000954,2.46000003815,0.680000007153,3.16000008583,0.759999990463,1.97000002861,1.66999995708
CsF,-0.10826331867429,55,9,6,2,-4.00619983673,-19.4043006897,-0.569599986076,-4.27349996567,-2.22000002861,-11.2939996719,-0.547999978065,1.25100004673,2.46000003815,0.409999996424,3.16000008583,0.370000004768,1.97000002861,1.42999994755
CsI,-0.162387474498246,55,53,6,5,-4.00619983673,-11.2571001053,-0.569599986076,-3.5134999752,-2.22000002861,-7.23600006104,-0.547999978065,0.212999999523,2.46000003815,0.899999976158,3.16000008583,1.07000005245,1.97000002861,1.72000002861
BrCu,0.152442639788205,29,35,4,4,-8.38879966736,-12.649600029,-1.6384999752,-3.73930001259,-4.85599994659,-8.00100040436,-0.64099997282,0.708000004292,1.20000004768,0.75,1.67999994755,0.879999995232,2.57999992371,1.87000000477
ClCu,0.156258713192074,29,17,4,3,-8.38879966736,-13.9018001556,-1.6384999752,-3.97079992294,-4.85599994659,-8.69999980927,-0.64099997282,0.574000000954,1.20000004768,0.680000007153,1.67999994755,0.759999990463,2.57999992371,1.66999995708
CuF,-0.017022272342729,29,9,4,2,-8.38879966736,-19.4043006897,-1.6384999752,-4.27349996567,-4.85599994659,-11.2939996719,-0.64099997282,1.25100004673,1.20000004768,0.409999996424,1.67999994755,0.370000004768,2.57999992371,1.42999994755
CuI,0.204674583263113,29,53,4,5,-8.38879966736,-11.2571001053,-1.6384999752,-3.5134999752,-4.85599994659,-7.23600006104,-0.64099997282,0.212999999523,1.20000004768,0.899999976158,1.67999994755,1.07000005245,2.57999992371,1.72000002861
GaN,0.433445239093999,31,7,4,2,-5.81820011139,-13.5852003098,-0.108099997044,-1.86749994755,-2.73200011253,-7.2389998436,0.129999995232,3.0569999218,0.990000009537,0.540000021458,1.33000004292,0.509999990463,2.16000008583,1.53999996185
GaP,0.348751797751902,31,15,4,3,-5.81820011139,-9.75059986115,-0.108099997044,-1.91999995708,-2.73200011253,-5.59600019455,0.129999995232,0.182999998331,0.990000009537,0.829999983311,1.33000004292,0.97000002861,2.16000008583,1.76999998093
GaSb,0.154625285096699,31,51,4,5,-5.81820011139,-8.46829986572,-0.108099997044,-1.84669995308,-2.73200011253,-4.99100017548,0.129999995232,0.104999996722,0.990000009537,1,1.33000004292,1.23000001907,2.16000008583,2.05999994278
Ge2,0.200852526060771,32,32,4,4,-7.56699991226,-7.56699991226,-0.949000000954,-0.949000000954,-4.04600000381,-4.04600000381,2.17499995232,2.17499995232,0.920000016689,0.920000016689,1.15999996662,1.15999996662,2.36999988556,2.36999988556
CGe,0.811442880200048,32,6,4,2,-7.56699991226,-10.8516998291,-0.949000000954,-0.87239998579,-4.04600000381,-5.41599988937,2.17499995232,1.99199998379,0.920000016689,0.639999985695,1.15999996662,0.629999995232,2.36999988556,1.62999999523
GeSi,0.263210170178354,32,14,4,3,-7.56699991226,-7.75769996643,-0.949000000954,-0.992999970913,-4.04600000381,-4.16300010681,2.17499995232,0.439999997616,0.920000016689,0.939999997616,1.15999996662,1.12999999523,2.36999988556,1.88999998569
AsIn,0.134047575193108,49,33,5,4,-5.53739976883,-9.26189994812,-0.256300002337,-1.83920001984,-2.6970000267,-5.34100008011,0.368000000715,0.0640000030398,1.12999999523,0.850000023842,1.5,1.03999996185,3.1099998951,2.01999998093
InN,0.15372029269929,49,7,5,2,-5.53739976883,-13.5852003098,-0.256300002337,-1.86749994755,-2.6970000267,-7.2389998436,0.368000000715,3.0569999218,1.12999999523,0.540000021458,1.5,0.509999990463,3.1099998951,1.53999996185
InP,0.179193287229282,49,15,5,3,-5.53739976883,-9.75059986115,-0.256300002337,-1.91999995708,-2.6970000267,-5.59600019455,0.368000000715,0.182999998331,1.12999999523,0.829999983311,1.5,0.97000002861,3.1099998951,1.76999998093
InSb,0.078059873019811,49,51,5,5,-5.53739976883,-8.46829986572,-0.256300002337,-1.84669995308,-2.6970000267,-4.99100017548,0.368000000715,0.104999996722,1.12999999523,1,1.5,1.23000001907,3.1099998951,2.05999994278
BrK,-0.166175964193826,19,35,4,4,-4.43319988251,-12.649600029,-0.621299982071,-3.73930001259,-2.42600011826,-8.00100040436,-0.697000026703,0.708000004292,2.13000011444,0.75,2.44000005722,0.879999995232,1.78999996185,1.87000000477
ClK,-0.16446068021105,19,17,4,3,-4.43319988251,-13.9018001556,-0.621299982071,-3.97079992294,-2.42600011826,-8.69999980927,-0.697000026703,0.574000000954,2.13000011444,0.680000007153,2.44000005722,0.759999990463,1.78999996185,1.66999995708
FK,-0.146406098498119,19,9,4,2,-4.43319988251,-19.4043006897,-0.621299982071,-4.27349996567,-2.42600011826,-11.2939996719,-0.697000026703,1.25100004673,2.13000011444,0.409999996424,2.44000005722,0.370000004768,1.78999996185,1.42999994755
IK,-0.167039145162562,19,53,4,5,-4.43319988251,-11.2571001053,-0.621299982071,-3.5134999752,-2.42600011826,-7.23600006104,-0.697000026703,0.212999999523,2.13000011444,0.899999976158,2.44000005722,1.07000005245,1.78999996185,1.72000002861
BrLi,-0.032746212884376,3,35,2,4,-5.32910013199,-12.649600029,-0.698099970818,-3.73930001259,-2.87400007248,-8.00100040436,-0.977999985218,0.708000004292,1.64999997616,0.75,2,0.879999995232,6.92999982834,1.87000000477
ClLi,-0.038381482699151,3,17,2,3,-5.32910013199,-13.9018001556,-0.698099970818,-3.97079992294,-2.87400007248,-8.69999980927,-0.977999985218,0.574000000954,1.64999997616,0.680000007153,2,0.759999990463,6.92999982834,1.66999995708
FLi,-0.059488316863735,3,9,2,2,-5.32910013199,-19.4043006897,-0.698099970818,-4.27349996567,-2.87400007248,-11.2939996719,-0.977999985218,1.25100004673,1.64999997616,0.409999996424,2,0.370000004768,6.92999982834,1.42999994755
ILi,-0.021660936341505,3,53,2,5,-5.32910013199,-11.2571001053,-0.698099970818,-3.5134999752,-2.87400007248,-7.23600006104,-0.977999985218,0.212999999523,1.64999997616,0.899999976158,2,1.07000005245,6.92999982834,1.72000002861
MgO,-0.232274724316994,12,8,3,2,-8.03709983826,-16.4332008362,0.692499995232,-3.00589990616,-4.78200006485,-9.19699954987,-1.35800004005,2.54099988937,1.33000004292,0.460000008345,1.89999997616,0.430000007153,3.17000007629,2.22000002861
MgS,-0.086699504988246,12,16,3,3,-8.03709983826,-11.7951002121,0.692499995232,-2.84489989281,-4.78200006485,-7.10599994659,-1.35800004005,0.64200001955,1.33000004292,0.740000009537,1.89999997616,0.850000023842,3.17000007629,2.36999988556
MgSe,-0.055301801956375,12,34,3,4,-8.03709983826,-10.9460000992,0.692499995232,-2.75099992752,-4.78200006485,-6.65399980545,-1.35800004005,1.31599998474,1.33000004292,0.800000011921,1.89999997616,0.949999988079,3.17000007629,2.18000006676
MgTe,-0.004591286648065,12,52,3,5,-8.03709983826,-9.86670017242,0.692499995232,-2.66599988937,-4.78200006485,-6.10900020599,-1.35800004005,0.0989999994636,1.33000004292,0.939999997616,1.89999997616,1.13999998569,3.17000007629,1.83000004292
BrNa,-0.12642872788274,11,35,3,4,-5.22310018539,-12.649600029,-0.715699970722,-3.73930001259,-2.81900000572,-8.00100040436,-0.717999994755,0.708000004292,1.71000003815,0.75,2.59999990463,0.879999995232,6.57000017166,1.87000000477
ClNa,-0.132991985081389,11,17,3,3,-5.22310018539,-13.9018001556,-0.715699970722,-3.97079992294,-2.81900000572,-8.69999980927,-0.717999994755,0.574000000954,1.71000003815,0.680000007153,2.59999990463,0.759999990463,6.57000017166,1.66999995708
FNa,-0.145788137787804,11,9,3,2,-5.22310018539,-19.4043006897,-0.715699970722,-4.27349996567,-2.81900000572,-11.2939996719,-0.717999994755,1.25100004673,1.71000003815,0.409999996424,2.59999990463,0.370000004768,6.57000017166,1.42999994755
INa,-0.114838222187245,11,53,3,5,-5.22310018539,-11.2571001053,-0.715699970722,-3.5134999752,-2.81900000572,-7.23600006104,-0.717999994755,0.212999999523,1.71000003815,0.899999976158,2.59999990463,1.07000005245,6.57000017166,1.72000002861
BrRb,-0.163820531422971,37,35,5,4,-4.28889989853,-12.649600029,-0.590399980545,-3.73930001259,-2.3599998951,-8.00100040436,-0.704999983311,0.708000004292,2.24000000954,0.75,3.20000004768,0.879999995232,1.96000003815,1.87000000477
ClRb,-0.160503554077877,37,17,5,3,-4.28889989853,-13.9018001556,-0.590399980545,-3.97079992294,-2.3599998951,-8.69999980927,-0.704999983311,0.574000000954,2.24000000954,0.680000007153,3.20000004768,0.759999990463,1.96000003815,1.66999995708
FRb,-0.135595776984701,37,9,5,2,-4.28889989853,-19.4043006897,-0.590399980545,-4.27349996567,-2.3599998951,-11.2939996719,-0.704999983311,1.25100004673,2.24000000954,0.409999996424,3.20000004768,0.370000004768,1.96000003815,1.42999994755
IRb,-0.167201442120131,37,53,5,5,-4.28889989853,-11.2571001053,-0.590399980545,-3.5134999752,-2.3599998951,-7.23600006104,-0.704999983311,0.212999999523,2.24000000954,0.899999976158,3.20000004768,1.07000005245,1.96000003815,1.72000002861
Si2,0.279165821548304,14,14,3,3,-7.75769996643,-7.75769996643,-0.992999970913,-0.992999970913,-4.16300010681,-4.16300010681,0.439999997616,0.439999997616,0.939999997616,0.939999997616,1.12999999523,1.12999999523,1.88999998569,1.88999998569
CSi,0.669023727235981,14,6,3,2,-7.75769996643,-10.8516998291,-0.992999970913,-0.87239998579,-4.16300010681,-5.41599988937,0.439999997616,1.99199998379,0.939999997616,0.639999985695,1.12999999523,0.629999995232,1.88999998569,1.62999999523
Sn2,0.016963899193797,50,50,5,5,-7.04279994965,-7.04279994965,-1.03919994831,-1.03919994831,-3.86599993706,-3.86599993706,0.00800000037998,0.00800000037998,1.05999994278,1.05999994278,1.34000003338,1.34000003338,2.02999997139,2.02999997139
CSn,0.453537974142819,50,6,5,2,-7.04279994965,-10.8516998291,-1.03919994831,-0.87239998579,-3.86599993706,-5.41599988937,0.00800000037998,1.99199998379,1.05999994278,0.639999985695,1.34000003338,0.629999995232,2.02999997139,1.62999999523
GeSn,0.081663360237144,50,32,5,4,-7.04279994965,-7.56699991226,-1.03919994831,-0.949000000954,-3.86599993706,-4.04600000381,0.00800000037998,2.17499995232,1.05999994278,0.920000016689,1.34000003338,1.15999996662,2.02999997139,2.36999988556
SiSn,0.135108799106092,50,14,5,3,-7.04279994965,-7.75769996643,-1.03919994831,-0.992999970913,-3.86599993706,-4.16300010681,0.00800000037998,0.439999997616,1.05999994278,0.939999997616,1.34000003338,1.12999999523,2.02999997139,1.88999998569
OSr,-0.22030662317411,38,8,5,2,-6.03159999847,-16.4332008362,0.343100011349,-3.00589990616,-3.64100003242,-9.19699954987,-1.3789999485,2.54099988937,1.90999996662,0.460000008345,2.54999995232,0.430000007153,1.20000004768,2.22000002861
SSr,-0.368434129930392,38,16,5,3,-6.03159999847,-11.7951002121,0.343100011349,-2.84489989281,-3.64100003242,-7.10599994659,-1.3789999485,0.64200001955,1.90999996662,0.740000009537,2.54999995232,0.850000023842,1.20000004768,2.36999988556
SeSr,-0.3745109517331,38,34,5,4,-6.03159999847,-10.9460000992,0.343100011349,-2.75099992752,-3.64100003242,-6.65399980545,-1.3789999485,1.31599998474,1.90999996662,0.800000011921,2.54999995232,0.949999988079,1.20000004768,2.18000006676
SrTe,-0.379294725862565,38,52,5,5,-6.03159999847,-9.86670017242,0.343100011349,-2.66599988937,-3.64100003242,-6.10900020599,-1.3789999485,0.0989999994636,1.90999996662,0.939999997616,2.54999995232,1.13999998569,1.20000004768,1.83000004292
OZn,0.101968176768423,30,8,4,2,-10.1354999542,-16.4332008362,1.08070003986,-3.00589990616,-6.21700000763,-9.19699954987,-1.19400000572,2.54099988937,1.10000002384,0.460000008345,1.54999995232,0.430000007153,2.25,2.22000002861
SZn,0.275813325606578,30,16,4,3,-10.1354999542,-11.7951002121,1.08070003986,-2.84489989281,-6.21700000763,-7.10599994659,-1.19400000572,0.64200001955,1.10000002384,0.740000009537,1.54999995232,0.850000023842,2.25,2.36999988556
SeZn,0.263136899280653,30,34,4,4,-10.1354999542,-10.9460000992,1.08070003986,-2.75099992752,-6.21700000763,-6.65399980545,-1.19400000572,1.31599998474,1.10000002384,0.800000011921,1.54999995232,0.949999988079,2.25,2.18000006676
TeZn,0.245001295174006,30,52,4,5,-10.1354999542,-9.86670017242,1.08070003986,-2.66599988937,-6.21700000763,-6.10900020599,-1.19400000572,0.0989999994636,1.10000002384,0.939999997616,1.54999995232,1.13999998569,2.25,1.83000004292
%% Cell type:code id: tags:
``` python
from cpp_sisso import generate_fs_sr_from_csv, Model
feat_sapce, sisso = generate_fs_sr_from_csv(
df="data.csv",
prop_key="energy_diff",
allowed_ops="all",
cols="all",
max_phi=2,
n_sis_select=100,
max_dim=3,
n_residuals=1,
task_key=None,
leave_out_frac=0.10,
)
```
%% Cell type:code id: tags:
``` python
sisso.fit()
```
%% Cell type:code id: tags:
``` python
import matplotlib.pyplot as plt
print([models[0].test_rmse for models in sisso.models])
plt.plot([1, 2, 3], [models[0].test_rmse for models in sisso.models])
```
%% Output
[0.21840220709133837, 0.1932239811232758, 0.1484061987754675]
[<matplotlib.lines.Line2D at 0x148ef1a968d0>]
%% Cell type:code id: tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment