From 5b5c6e228d94d2fcb681b78a73aa4d6e3abf2e0c Mon Sep 17 00:00:00 2001 From: s222181037 Date: Mon, 30 Sep 2024 15:26:18 +1000 Subject: [PATCH] SLEEP ANALYSIS USING ALL FEATURES building machine learning models using all features of the datasets --- .../sleep_analysis_phase_1.ipynb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/data_science/sleep_disorder_prediction/all_feature_sleep_pattern_analysis/sleep_analysis_phase_1.ipynb b/data_science/sleep_disorder_prediction/all_feature_sleep_pattern_analysis/sleep_analysis_phase_1.ipynb index c654eabc..23ee0b61 100644 --- a/data_science/sleep_disorder_prediction/all_feature_sleep_pattern_analysis/sleep_analysis_phase_1.ipynb +++ b/data_science/sleep_disorder_prediction/all_feature_sleep_pattern_analysis/sleep_analysis_phase_1.ipynb @@ -311,14 +311,14 @@ ], "source": [ "# GitHub link for the Excel file\n", - "url = \"https://raw.githubusercontent.com/Redback-Operations/redback-senior-tech/main/data_science/sleep_disorder_prediction/data/SleepStagingStatisticalFeatures.xlsx\"\n", + "URL = \"https://raw.githubusercontent.com/Redback-Operations/redback-senior-tech/main/data_science/sleep_disorder_prediction/data/SleepStagingStatisticalFeatures.xlsx\"\n", "\n", "# Reading the Excel file using the raw content link\n", - "STATISTICAL_FEATURES = pd.read_excel(url, engine='openpyxl')\n", + "STATISTICAL_FEATURES = pd.read_excel(URL, engine='openpyxl')\n", "\n", "# Displaying the first few rows and the info of the dataset\n", "display(STATISTICAL_FEATURES.head())\n", - "STATISTICAL_FEATURES.info()\n" + "STATISTICAL_FEATURES.info()" ] }, { @@ -597,10 +597,10 @@ ], "source": [ "# GitHub link for the Excel file\n", - "url = \"https://raw.githubusercontent.com/Redback-Operations/redback-senior-tech/main/data_science/sleep_disorder_prediction/data/SleepStagingCardioRespiratoryFeatures.xlsx\"\n", + "URL = \"https://raw.githubusercontent.com/Redback-Operations/redback-senior-tech/main/data_science/sleep_disorder_prediction/data/SleepStagingCardioRespiratoryFeatures.xlsx\"\n", "\n", "# Reading the Excel file using the raw content link\n", - "CARDIO_RESPIRATORY_FEATURES = pd.read_excel(url, engine='openpyxl')\n", + "CARDIO_RESPIRATORY_FEATURES = pd.read_excel(URL, engine='openpyxl')\n", "\n", "# Displaying the first few rows and the info of the dataset\n", "display(CARDIO_RESPIRATORY_FEATURES.head())\n", @@ -868,10 +868,10 @@ ], "source": [ "# GitHub link for the Excel file\n", - "url = \"https://raw.githubusercontent.com/Redback-Operations/redback-senior-tech/main/data_science/sleep_disorder_prediction/data/SleepStagingArterialFeatures.xlsx\"\n", + "URL = \"https://raw.githubusercontent.com/Redback-Operations/redback-senior-tech/main/data_science/sleep_disorder_prediction/data/SleepStagingArterialFeatures.xlsx\"\n", "\n", "# Reading the Excel file using the raw content link\n", - "ARTERIAL_FEATURES = pd.read_excel(url, engine='openpyxl')\n", + "ARTERIAL_FEATURES = pd.read_excel(URL, engine='openpyxl')\n", "\n", "# Displaying the first few rows and the info of the dataset\n", "display(ARTERIAL_FEATURES.head())\n", @@ -2301,7 +2301,7 @@ { "data": { "text/plain": [ - "' precision recall f1-score support\\n\\n 1 0.50 0.27 0.35 233\\n 2 0.58 0.71 0.63 529\\n 3 0.65 0.43 0.52 223\\n 4 0.70 0.57 0.63 77\\n 5 0.81 0.48 0.61 163\\n 6 0.72 0.88 0.79 661\\n\\n accuracy 0.66 1886\\n macro avg 0.66 0.56 0.59 1886\\nweighted avg 0.65 0.66 0.64 1886\\n'" + "' precision recall f1-score support\\n\\n 1 0.46 0.26 0.33 233\\n 2 0.58 0.70 0.64 529\\n 3 0.64 0.43 0.51 223\\n 4 0.68 0.56 0.61 77\\n 5 0.78 0.49 0.60 163\\n 6 0.73 0.88 0.80 661\\n\\n accuracy 0.65 1886\\n macro avg 0.65 0.55 0.58 1886\\nweighted avg 0.65 0.65 0.64 1886\\n'" ] }, "execution_count": 19,