Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
otavioon committed Jun 27, 2024
1 parent 04163a7 commit 4c718fe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: 3.12.1
python-version: 3.11.9

- name: Install packages
run: |
Expand Down
22 changes: 22 additions & 0 deletions notebooks/05_covid_anomaly_detection.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 5. Training an Anomaly Detection Model for Covid Anomaly Detection\n",
"\n",
"In this tutorial, we will train an anomaly detection model using a simple [LSTM-AutoEncoder model](https://www.medrxiv.org/content/10.1101/2021.01.08.21249474v1).\n",
"Data can be obtained from [this link](https://iscteiul365-my.sharepoint.com/:u:/g/personal/oonia_iscte-iul_pt/ERZLm1ruUNpMqkSwjpqhE9wB_7loVWAC4yZWuIH2RKGOlQ?e=kD4HlI). This is a processed version of data from original Stanford dataset-Phase 2. The overall pre-processing pipeline used is illustrated in Figure below.\n",
"\n",
"![preprocessing](stanford_data_processing.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Data was aquired from diferent sources (Germin, FitBit, Apple Watch) and pre-processed to have a common format. In this form, data has two columns: heart rate and number of user steps in last minute. \n",
"Then the processing pipeline was applied to the data. The pipeline is composed of the following steps:\n",
"1. Once data was standardized, the resting heart rate was extracted (``Resting Heart Rate Extractor``, in Figure). This process takes as input `min_minutes_rest` that is the number of minutes that the user has to be at rest to consider the heart rate as resting. This variable looks at user steps and, when user steps is 0 for `min_minutes_rest` minutes, the heart rate is considered as resting. At the end of this process, we will have a new dataframe with: the date and the resting heart rate of the last minute.\n",
"2. The second step is adding labels."
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
Binary file added notebooks/stanford_data_processing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4c718fe

Please sign in to comment.