Delete the leftover class.

Add more prints.
rapids
junos 2021-08-23 16:09:23 +02:00
parent 3611fc76f7
commit 0152fbe4ac
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,7 @@ class SensorFeatures:
print("SensorFeatures initialized.")
def set_sensor_data(self):
print("Querying database ...")
if "proximity" in self.data_types:
self.df_proximity = proximity.get_proximity_data(
self.participants_usernames
@ -65,6 +66,7 @@ class SensorFeatures:
raise KeyError("This data type has not been implemented.")
def calculate_features(self):
print("Calculating features ...")
if "proximity" in self.data_types:
self.df_proximity_counts = proximity.count_proximity(
self.df_proximity, self.grouping_variable
@ -137,6 +139,7 @@ class Labels:
print("Labels initialized.")
def set_labels(self):
print("Querying database ...")
self.df_esm = esm.get_esm_data(self.participants_usernames)
print("Got ESM data from the DB.")
self.df_esm_preprocessed = esm.preprocess_esm(self.df_esm)
@ -162,6 +165,7 @@ class Labels:
raise KeyError("This questionnaire has not been implemented as a label.")
def aggregate_labels(self):
print("Aggregating labels ...")
self.df_esm_means = (
self.df_esm_clean.groupby(
["participant_id", "questionnaire_id"] + self.grouping_variable
@ -207,6 +211,7 @@ class ModelValidation:
print("Validation method set.")
def cross_validate(self):
print("Running cross validation ...")
if self.model is None:
raise TypeError(
"Please, specify a machine learning model first, by setting the .model attribute. "