diff --git a/src/classification/utils.cpp b/src/classification/utils.cpp index 953f17e015006fe3fa766fc54b6ee1995f6d6f28..2cf4c68208e1541b9cf257fcce56d4247f4f3073 100644 --- a/src/classification/utils.cpp +++ b/src/classification/utils.cpp @@ -1,4 +1,4 @@ -#include <classificationutils.hpp> +#include <classification/utils.hpp> std::vector<double> convex_hull::SORTED_VALUE; std::vector<int> convex_hull::SORTED_PROP_INDS; diff --git a/src/python/__init__.py b/src/python/__init__.py index 469b86576852ec822e8b8165ff59ad7ba7ea2b6d..0ad8455dc769ccbe43753af0ffe73285b8c183e2 100644 --- a/src/python/__init__.py +++ b/src/python/__init__.py @@ -77,7 +77,6 @@ def generate_phi_0_from_csv( # Load csv file if isinstance(df, str): df = pd.read_csv(df, index_col=0) - df = df.astype(float) df_cols = df.columns.to_list() col_exprs = [c.split(" (")[0] for c in df_cols] prop_ind = np.where([c_ex == prop_key.split(" (")[0] for c_ex in col_exprs])[0][0] @@ -105,6 +104,7 @@ def generate_phi_0_from_csv( prop = df[prop_key].to_numpy() df = df.drop([prop_key], axis=1) + df = df.astype(float) # Get test and training sets= if leave_out_frac > 0.0 and leave_out_inds is None: leave_out_inds = [] diff --git a/src/utils/project.hpp b/src/utils/project.hpp index 59f217e003b9673bd5f47331bbebc03d7330ecb2..ff24e1ba8fb1ffe3154bd553378da56301a656fd 100644 --- a/src/utils/project.hpp +++ b/src/utils/project.hpp @@ -10,7 +10,7 @@ #include <limits> #include <feature_creation/node/Node.hpp> -#include <classificationutils.hpp> +#include <classification/utils.hpp> namespace project_funcs { diff --git a/tests/test_descriptor_identifier/test_regressor.py b/tests/test_descriptor_identifier/test_regressor.py index 264e2ac63c4e933f74e6c9a0bf93bda4d9e5d70e..9b13f8a787b2a8c30b40c0fa4252a4a5f9d831bd 100644 --- a/tests/test_descriptor_identifier/test_regressor.py +++ b/tests/test_descriptor_identifier/test_regressor.py @@ -36,7 +36,7 @@ def test_sisso_regressor(): op_set = ["add", "sub", "mult", "sq", "cb", "sqrt", "cbrt"] - feat_space = generate_fs(phi_0, prop, [90], op_set, 2, 10) + feat_space = generate_fs(phi_0, prop, [90], op_set, "regression", 2, 10) sisso = SISSORegressor( feat_space, diff --git a/tests/test_feature_creation/test_feature_space/test_feature_space.py b/tests/test_feature_creation/test_feature_space/test_feature_space.py index db0d03fc7f3cfb817870e79f10f38b51200c7d16..4c237ea13c8a73875303c0709b210430f761ce99 100644 --- a/tests/test_feature_creation/test_feature_space/test_feature_space.py +++ b/tests/test_feature_creation/test_feature_space/test_feature_space.py @@ -26,7 +26,7 @@ def test_feature_space(): op_set = ["add", "sub", "mult", "sq", "cb", "sqrt", "cbrt"] - feat_space = generate_fs(phi_0, prop, [90], op_set, 2, 10) + feat_space = generate_fs(phi_0, prop, [90], op_set, "regression", 2, 10) feat_space.sis(prop) assert feat_space.phi_selected[0].postfix_expr == "1|0|add|sq"