Print some more messages.
parent
11381d6447
commit
24c4bef7e2
|
@ -34,6 +34,7 @@ class SensorFeatures:
|
|||
self.df_calls = pd.DataFrame()
|
||||
self.df_sms = pd.DataFrame()
|
||||
self.df_calls_sms = pd.DataFrame()
|
||||
print("SensorFeatures initialized.")
|
||||
|
||||
def set_sensor_data(self):
|
||||
if "proximity" in self.data_types:
|
||||
|
@ -124,6 +125,7 @@ class Labels:
|
|||
self.df_esm_clean = pd.DataFrame()
|
||||
|
||||
self.df_esm_means = pd.DataFrame()
|
||||
print("Labels initialized.")
|
||||
|
||||
def set_labels(self):
|
||||
self.df_esm = esm.get_esm_data(self.participants_usernames)
|
||||
|
@ -198,10 +200,13 @@ class ModelValidation:
|
|||
def cross_validate(self):
|
||||
if self.model is None:
|
||||
raise TypeError(
|
||||
"Please set self.model first, e.g. self.model = sklearn.linear_model.LinearRegression()"
|
||||
"Please, specify a machine learning model first, by setting the .model attribute. "
|
||||
"E.g. self.model = sklearn.linear_model.LinearRegression()"
|
||||
)
|
||||
if self.cv is None:
|
||||
raise TypeError("Please use set_cv_method() first.")
|
||||
raise TypeError(
|
||||
"Please, specify a cross validation method first, by using set_cv_method() first."
|
||||
)
|
||||
if self.X.isna().any().any() or self.y.isna().any().any():
|
||||
raise ValueError(
|
||||
"NaNs were found in either X or y. Please, check your data before continuing."
|
||||
|
|
Loading…
Reference in New Issue