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

rename pybinding module to cpp_sisso

Remove conflict with pySISSO
parent e4a58682
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id: tags:
``` python
from sisso import generate_fs_sr_from_csv, Model
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",
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 0x146a437602e8>]
%% Cell type:code id: tags:
``` python
```
......
......@@ -62,8 +62,8 @@ if(USE_PYTHON)
)
# target_link_libraries(_sisso ${MPI_LIBRARIES} -Wl,--rpath=${PYTHON_PREFIX}/lib/ ${PYTHON_LAPACK_LIBRARIES} ${PYTHON_LIBRARIES} -Wl,--rpath=${Boost_LIB_DIR} ${Boost_LIBS})
target_link_libraries(_sisso ${MPI_LIBRARIES} -Wl,--rpath=${PYTHON_PREFIX}/lib/ ${LAPACK_LIBRARIES} ${PYTHON_LIBRARIES} -Wl,--rpath=${Boost_LIB_DIR} ${Boost_LIBRARIES} ${Boost_PYTHON_LIBRARIES})
install(TARGETS _sisso DESTINATION "${PYTHON_INSTDIR}/sisso")
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/python/ DESTINATION ${PYTHON_INSTDIR}/sisso
install(TARGETS _sisso DESTINATION "${PYTHON_INSTDIR}/cpp_sisso")
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/python/ DESTINATION ${PYTHON_INSTDIR}/cpp_sisso
FILES_MATCHING PATTERN "*.py"
PATTERN "CMakeFiles" EXCLUDE)
endif()
from sisso._sisso import *
from cpp_sisso._sisso import *
import numpy as np
import pandas as pd
......
import shutil
from pathlib import Path
from sisso import generate_fs_sr_from_csv
from cpp_sisso import generate_fs_sr_from_csv
parent = Path(__file__).parent
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment