Skip to content
Snippets Groups Projects
Commit ebc2f578 authored by Sortofamudkip's avatar Sortofamudkip
Browse files

get_combined_anxiety_score documentation

parent a9300083
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,18 @@ class Dataset: ...@@ -23,7 +23,18 @@ class Dataset:
# more preprocessing goes here # more preprocessing goes here
return dataframe 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_max = 21
gad_min = 0 gad_min = 0
gad_normalised = (dataframe["GAD_T"] - gad_min) / gad_max gad_normalised = (dataframe["GAD_T"] - gad_min) / gad_max
......
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