From ebc2f5786047b535f87249f16dfda4c2b8452ff1 Mon Sep 17 00:00:00 2001
From: Sortofamudkip <wishyutp0328@gmail.com>
Date: Sat, 8 Jul 2023 17:45:06 +0200
Subject: [PATCH] get_combined_anxiety_score documentation

---
 src/Dataset.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/Dataset.py b/src/Dataset.py
index 48d6ee5..e8f0314 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
-- 
GitLab