diff --git a/src/Dataset.py b/src/Dataset.py index 48d6ee542fe89aa4811be6321cd964cf0275b2b8..e8f0314352d22230d893d1bcb0eb551c9e3d36a5 100644 --- a/src/Dataset.py +++ b/src/Dataset.py @@ -23,7 +23,18 @@ class Dataset: # more preprocessing goes here return dataframe - def get_combined_anxiety_score(self, dataframe: pd.DataFrame): + def get_combined_anxiety_score(self, dataframe: pd.DataFrame) -> pd.Series: + """Get the combined axiety score, as a column. + This score is based on the GAN, SPIN and SWL metrics. + Each of the three columns are first normalised, + then the mean is returned. + + Args: + dataframe (pd.DataFrame): the dataframe. + + Returns: + pd.Series: the anxiety score column. + """ gad_max = 21 gad_min = 0 gad_normalised = (dataframe["GAD_T"] - gad_min) / gad_max