Skip to content
Snippets Groups Projects
Commit 6cc968b4 authored by DIANE Abderrahim's avatar DIANE Abderrahim
Browse files

errors correction

parent 640e258c
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ class JcampParser:
@property
def meta_data_st_(self):
me = self.metadata_.drop("concentrations", axis = 1)
me = me.drop(me.columns[(me == '').all()], axis = 1).applymap(lambda x: x.upper() if isinstance(x, str) else x)
me = me.drop(me.columns[(me == '').all()], axis = 1).map(lambda x: x.upper() if isinstance(x, str) else x)
meta_data_st = me.loc[:,me.nunique(axis=0) > 1]
return meta_data_st
......@@ -124,7 +124,7 @@ class CsvParser:
@property
def meta_data_st_(self):
me = self.non_float.applymap(lambda x: x.upper() if isinstance(x, str) else x)
me = self.non_float.map(lambda x: x.upper() if isinstance(x, str) else x)
meta_data_st = me.loc[:,me.nunique(axis=0) > 1]
return meta_data_st
......
......@@ -24,7 +24,7 @@ def download_results(data, export_name):
def data_split(x, y):
from kennard_stone import train_test_split
# Split data into training and test sets using the kennard_stone method and correlation metric, 25% of data is used for testing
X_train, X_test, y_train, y_test = train_test_split(x, y, test_size = 0.25, random_state = 42)
X_train, X_test, y_train, y_test = train_test_split(x, y, test_size = 0.25)
train_index, test_index = np.array(X_train.index), np.array(X_test.index)
return X_train, X_test, y_train, y_test, train_index, test_index
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment