Skip to content

Commit

Permalink
feat: Add PPG model.
Browse files Browse the repository at this point in the history
  • Loading branch information
apage224 committed Aug 27, 2024
1 parent e7d00e8 commit 40698aa
Show file tree
Hide file tree
Showing 42 changed files with 463 additions and 363 deletions.
2 changes: 2 additions & 0 deletions docs/assets/zoo/seg-ppg-2-tcn-sm/confusion_matrix_test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script charset="utf-8" src="https://cdn.plot.ly/plotly-2.34.0.min.js"></script> <div id="7316bbf8-5397-4a5d-a1e5-95e8dffdfe89" class="plotly-graph-div" style="height:400px; width:100%;"></div> <script type="text/javascript"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById("7316bbf8-5397-4a5d-a1e5-95e8dffdfe89")) { Plotly.newPlot( "7316bbf8-5397-4a5d-a1e5-95e8dffdfe89", [{"coloraxis":"coloraxis","name":"0","x":["SYS","DIA"],"y":["SYS","DIA"],"z":[[0.9837088408536308,0.016291159146369236],[0.012768755210476474,0.9872312447895235]],"type":"heatmap","xaxis":"x","yaxis":"y","hovertemplate":"Predicted: %{x}\u003cbr\u003eActual: %{y}\u003cbr\u003eCount: %{z}\u003cextra\u003e\u003c\u002fextra\u003e","text":[["2.18128e+06\u003cbr\u003e98.37%","36124\u003cbr\u003e1.63%"],["36958\u003cbr\u003e1.28%","2.85745e+06\u003cbr\u003e98.72%"]],"texttemplate":"%{text}"}], {"template":{"data":{"barpolar":[{"marker":{"line":{"color":"rgb(17,17,17)","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"bar":[{"error_x":{"color":"#f2f5fa"},"error_y":{"color":"#f2f5fa"},"marker":{"line":{"color":"rgb(17,17,17)","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"carpet":[{"aaxis":{"endlinecolor":"#A2B1C6","gridcolor":"#506784","linecolor":"#506784","minorgridcolor":"#506784","startlinecolor":"#A2B1C6"},"baxis":{"endlinecolor":"#A2B1C6","gridcolor":"#506784","linecolor":"#506784","minorgridcolor":"#506784","startlinecolor":"#A2B1C6"},"type":"carpet"}],"choropleth":[{"colorbar":{"outlinewidth":0,"ticks":""},"type":"choropleth"}],"contourcarpet":[{"colorbar":{"outlinewidth":0,"ticks":""},"type":"contourcarpet"}],"contour":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"type":"contour"}],"heatmapgl":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"type":"heatmapgl"}],"heatmap":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"type":"heatmap"}],"histogram2dcontour":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"type":"histogram2dcontour"}],"histogram2d":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"type":"histogram2d"}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"mesh3d":[{"colorbar":{"outlinewidth":0,"ticks":""},"type":"mesh3d"}],"parcoords":[{"line":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"parcoords"}],"pie":[{"automargin":true,"type":"pie"}],"scatter3d":[{"line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatter3d"}],"scattercarpet":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scattercarpet"}],"scattergeo":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scattergeo"}],"scattergl":[{"marker":{"line":{"color":"#283442"}},"type":"scattergl"}],"scattermapbox":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scattermapbox"}],"scatterpolargl":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatterpolargl"}],"scatterpolar":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatterpolar"}],"scatter":[{"marker":{"line":{"color":"#283442"}},"type":"scatter"}],"scatterternary":[{"marker":{"colorbar":{"outlinewidth":0,"ticks":""}},"type":"scatterternary"}],"surface":[{"colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"type":"surface"}],"table":[{"cells":{"fill":{"color":"#506784"},"line":{"color":"rgb(17,17,17)"}},"header":{"fill":{"color":"#2a3f5f"},"line":{"color":"rgb(17,17,17)"}},"type":"table"}]},"layout":{"annotationdefaults":{"arrowcolor":"#f2f5fa","arrowhead":0,"arrowwidth":1},"autotypenumbers":"strict","coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]],"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]},"colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#f2f5fa"},"geo":{"bgcolor":"rgb(17,17,17)","lakecolor":"rgb(17,17,17)","landcolor":"rgb(17,17,17)","showlakes":true,"showland":true,"subunitcolor":"#506784"},"hoverlabel":{"align":"left"},"hovermode":"closest","mapbox":{"style":"dark"},"paper_bgcolor":"rgb(17,17,17)","plot_bgcolor":"rgb(17,17,17)","polar":{"angularaxis":{"gridcolor":"#506784","linecolor":"#506784","ticks":""},"bgcolor":"rgb(17,17,17)","radialaxis":{"gridcolor":"#506784","linecolor":"#506784","ticks":""}},"scene":{"xaxis":{"backgroundcolor":"rgb(17,17,17)","gridcolor":"#506784","gridwidth":2,"linecolor":"#506784","showbackground":true,"ticks":"","zerolinecolor":"#C8D4E3"},"yaxis":{"backgroundcolor":"rgb(17,17,17)","gridcolor":"#506784","gridwidth":2,"linecolor":"#506784","showbackground":true,"ticks":"","zerolinecolor":"#C8D4E3"},"zaxis":{"backgroundcolor":"rgb(17,17,17)","gridcolor":"#506784","gridwidth":2,"linecolor":"#506784","showbackground":true,"ticks":"","zerolinecolor":"#C8D4E3"}},"shapedefaults":{"line":{"color":"#f2f5fa"}},"sliderdefaults":{"bgcolor":"#C8D4E3","bordercolor":"rgb(17,17,17)","borderwidth":1,"tickwidth":0},"ternary":{"aaxis":{"gridcolor":"#506784","linecolor":"#506784","ticks":""},"baxis":{"gridcolor":"#506784","linecolor":"#506784","ticks":""},"bgcolor":"rgb(17,17,17)","caxis":{"gridcolor":"#506784","linecolor":"#506784","ticks":""}},"title":{"x":0.05},"updatemenudefaults":{"bgcolor":"#506784","borderwidth":0},"xaxis":{"automargin":true,"gridcolor":"#283442","linecolor":"#506784","ticks":"","title":{"standoff":15},"zerolinecolor":"#283442","zerolinewidth":2},"yaxis":{"automargin":true,"gridcolor":"#283442","linecolor":"#506784","ticks":"","title":{"standoff":15},"zerolinecolor":"#283442","zerolinewidth":2}}},"xaxis":{"anchor":"y","domain":[0.0,1.0],"scaleanchor":"y","constrain":"domain","title":{"text":"Predicted"}},"yaxis":{"anchor":"x","domain":[0.0,1.0],"autorange":"reversed","constrain":"domain","title":{"text":"Actual"}},"coloraxis":{"colorbar":{"title":{"text":"Count"}},"colorscale":[[0.0,"#0508b8"],[0.08333333333333333,"#1910d8"],[0.16666666666666666,"#3c19f0"],[0.25,"#6b1cfb"],[0.3333333333333333,"#981cfd"],[0.4166666666666667,"#bf1cfd"],[0.5,"#dd2bfd"],[0.5833333333333334,"#f246fe"],[0.6666666666666666,"#fc67fd"],[0.75,"#fe88fc"],[0.8333333333333334,"#fea5fd"],[0.9166666666666666,"#febefe"],[1.0,"#fec3fe"]]},"margin":{"t":40,"l":20,"r":5,"b":20},"plot_bgcolor":"rgba(38,42,50,1.0)","paper_bgcolor":"rgba(38,42,50,1.0)","height":400,"title":{}}, {"responsive": true} ) }; </script> </div>
3 changes: 3 additions & 0 deletions docs/assets/zoo/seg-ppg-2-tcn-sm/results.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
| NAME | DATASET | FS | DURATION | # CLASSES | MODEL | PARAMS | FLOPS | METRIC |
| -------------------- | ------------------------ | ----- | -------- | --------- | ------------- | ------ | ------- | --------- |
| __SEG-PPG-2-TCN-SM__ | Synthetic | 100Hz | 2.5s | 2 | TCN | 4K | 1.43M | 98.6% F1 |
2 changes: 1 addition & 1 deletion docs/guides/byot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@
" if params.architecture is None:\n",
" raise ValueError(\"Model architecture must be specified\")\n",
" model = hk.ModelFactory.get(params.architecture.name)(\n",
" x=inputs,\n",
" inputs=inputs,\n",
" params=params.architecture.params,\n",
" num_classes=params.num_classes,\n",
" )\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/models/byom.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The model factory can be extended to include custom models. This is useful when
```py linenums="1"
inputs = keras.Input(shape=(100,))
model = hk.ModelFactory.get("custom-model")(
x=inputs,
inputs=inputs,
params={
"layers": [
{"units": 64, "activation": "relu"},
Expand Down
8 changes: 4 additions & 4 deletions docs/models/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ Given the following configuration file `configuration.json`:
}
```

### Defining a model in code

The model can be created using the following command:
The model can be then be created using the following command:

```bash
heartkit --mode train --task rhythm --config config.json
```

### Defining a model in code

Alternatively, the model can be created directly in code using the following snippet:

```py linenums="1"
Expand Down Expand Up @@ -103,7 +103,7 @@ inputs = keras.Input(shape=(256,1), dtype="float32")
num_classes = 5

model = hk.ModelFactory.get(architecture["name"])(
x=inputs,
inputs=inputs,
params=architecture["params"],
num_classes=num_classes,
)
Expand Down
2 changes: 1 addition & 1 deletion docs/modes/configuration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Configuration Parameters
# :material-code-json: Configuration Parameters

For each mode, common configuration parameters, [HKTaskParams](#hktaskparams), are required to run the task. These parameters are used to define the task, datasets, model, and other settings. Rather than defining separate configuration files for each mode, a single configuration object is used to simplify configuration files and heavy re-use of parameters between modes.

Expand Down
3 changes: 1 addition & 2 deletions docs/modes/demo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Task-Level Demo
# :material-hexagon-multiple: Task-Level Demo

## <span class="sk-h2-span">Introduction </span>

Expand Down Expand Up @@ -48,7 +48,6 @@ end
F ==> G
```


---

## <span class="sk-h2-span">Backend Inference Engines</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/modes/download.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Download Datasets
# :material-download: Download Datasets

## <span class="sk-h2-span">Introduction</span>

Expand Down
3 changes: 1 addition & 2 deletions docs/modes/evaluate.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Model Evaluation
# :material-ab-testing: Model Evaluation

## <span class="sk-h2-span">Introduction </span>

Evaluate mode is used to test the performance of the model on the reserved test set for the specified task. Similar to training, the routine can be customized via CLI configuration file or by setting the parameters directly in the code. The evaluation process involves testing the model's performance on the test data to measure its accuracy, precision, recall, and F1 score. A number of results and metrics will be generated and saved to the `job_dir`.

<div class="annotate" markdown>


1. Load the configuration data (e.g. `configuration.json` (1))
1. Load the desired datasets (e.g. `PtbxlDataset`)
1. Load the corresponding task dataloaders (e.g. `PtbxlDataLoader`)
Expand Down
2 changes: 1 addition & 1 deletion docs/modes/export.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Model Exporting
# :material-export: Model Exporting

## <span class="sk-h2-span">Introduction </span>

Expand Down
2 changes: 1 addition & 1 deletion docs/modes/train.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Model Training
# :material-chart-ppf: Model Training

## <span class="sk-h2-span">Introduction </span>

Expand Down
5 changes: 4 additions & 1 deletion docs/tasks/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tasks
# :simple-task: Tasks

## <span class="sk-h2-span">Introduction</span>

Expand All @@ -8,6 +8,7 @@ HeartKit provides several built-in __heart-monitoring__ tasks. Each task is desi
![Task Diagram](../assets/tasks/heartkit-task-diagram.svg){ width="600" }
</figure>

---

## <span class="sk-h2-span">Available Tasks</span>

Expand Down Expand Up @@ -35,6 +36,8 @@ Multi-label diagnostic classification is the process of assigning diagnostic lab

[Bring-Your-Own-Task (BYOT)](./byot.md) is a feature that allows users to create custom tasks by extending the [HKTask](/heartkit/api/heartkit/tasks/task) base class and registering it with the `TaskFactory`. This feature is useful for addressing specific use cases that are not covered by the built-in tasks.

---

## <span class="sk-h2-span">Task Factory</span>

The task factory, `TaskFactory`, provides a convenient way to access the built-in tasks. The factory is a thread-safe singleton class that provides a single point of access to the tasks via the tasks' slug names. The benefit of using the factory is it allows registering custom tasks that can then be used just like built-in tasks.
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/cli.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CLI Usage
# :octicons-terminal-24: HeartKit CLI

<div class="termy">

Expand Down Expand Up @@ -102,7 +102,7 @@ The [train](../modes/train.md) command is used to train a HeartKit model for the

## [Evaluate](../modes/evaluate.md)

The [evaluate](../modes/evaluate.md) command will test the performance of the model on the reserved test sets for the specified `task`. The routine can be customized via the configuration file.Please refer to [HKTaskParams](../modes/configuration.md#hktaskparams) to see supported options.
The [evaluate](../modes/evaluate.md) command will test the performance of the model on the reserved test sets for the specified `task`. The routine can be customized via the configuration file. Please refer to [HKTaskParams](../modes/configuration.md#hktaskparams) to see supported options.

!!! example "CLI"

Expand Down
4 changes: 2 additions & 2 deletions docs/usage/python.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Python Usage
# :simple-python: Python Usage

__HeartKit__ python package allows for more fine-grained control and customization. You can use the package to train, evaluate, and deploy models for both built-in taks and custom tasks. In addition, custom datasets and model architectures can be created and registered with corresponding factories.

Expand Down Expand Up @@ -39,7 +39,7 @@ num_classes = 4
model_params = dict(...)
model = hk.ModelFactory.get('tcn')(
x=inputs,
inputs=inputs,
params=model_params,
num_classes=num_classes
)
Expand Down
10 changes: 5 additions & 5 deletions docs/zoo/arr-2-eff-sm.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# ARR-2-EFF-SM
# 2-Class Arrhythmia Classification (ARR-2-EFF-SM)


## <span class="sk-h2-span">Overview</span>

The following table provides the latest pre-trained models for 2-class arrhythmia classification. Below we also provide additional details including training configuration, accuracy metrics, and hardware performance results for the models.
The following table provides the latest pre-trained model for 2-class arrhythmia classification. Below we also provide additional details including training configuration, performance metrics, and downloads.

--8<-- "assets/zoo/arr-2-eff-sm/results.md"

Expand All @@ -17,7 +18,7 @@ The following table provides the latest pre-trained models for 2-class arrhythmi

## <span class="sk-h2-span">Class Mapping</span>

The model is trained on raw ECG data and is able to discern normal sinus rhythm (NSR) from atrial fibrillation (AFIB) and atrial flutter (AFL).
The model is trained on raw ECG data and is able to discern normal sinus rhythm (NSR) from atrial fibrillation (AFIB) and atrial flutter (AFL). The class mapping is as follows:


| Base Class | Target Class | Label |
Expand All @@ -30,15 +31,14 @@ The model is trained on raw ECG data and is able to discern normal sinus rhythm

The model is trained on the following datasets:

- **[Icentia11k](../datasets/icentia11k.md)**
- **[PTB-XL](../datasets/ptbxl.md)**
- **[LSAD](../datasets/lsad.md)**

---

## <span class="sk-h2-span">Model Performance</span>

The confusion matrix for the model is depicted below.
The confusion matrix on the test set for the model is depicted below.

<div class="sk-plotly-graph-div">
--8<-- "assets/zoo/arr-2-eff-sm/confusion_matrix_test.html"
Expand Down
8 changes: 5 additions & 3 deletions docs/zoo/arr-4-eff-sm.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# ARR-4-EFF-SM
# 4-Class Arrhythmia Classification (ARR-4-EFF-SM)

## <span class="sk-h2-span">Overview</span>

The following table provides the latest pre-trained models for 4-class arrhythmia classification. Below we also provide additional details including training configuration, accuracy metrics, and hardware performance results for the models.
The following table provides the latest pre-trained model for 4-class arrhythmia classification. Below we also provide additional details including training configuration, performance metrics, and downloads.

--8<-- "assets/zoo/rhythm/rhythm-model-zoo-table.md"

---

## <span class="sk-h2-span">Input</span>

The model is trained on 5-second, raw ECG frames sampled at 100 Hz.

- **Sensor**: ECG
- **Location**: Wrist
- **Sampling Rate**: 100 Hz
Expand All @@ -19,7 +21,7 @@ The following table provides the latest pre-trained models for 4-class arrhythmi

## <span class="sk-h2-span">Class Mapping</span>

Identify rhythm into one of four categories: SR, SBRAD, AFIB, GSVT.
The model is trained on raw ECG data and is able to discern normal sinus rhythm (SR) from sinus bradycardia (SBRAD), atrial fibrillation (AFIB), atrial flutter (AFL), supraventricular tachycardia (STACH), and general supraventricular tachycardia (GSVT). The class mapping is as follows:

| Base Class | Target Class | Label |
| -------------- | ------------ | ------------------------- |
Expand Down
9 changes: 6 additions & 3 deletions docs/zoo/beat-2-eff-sm.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# BEAT-2-EFF-SM
# 2-Class Beat Classification (BEAT-2-EFF-SM)

## <span class="sk-h2-span">Overview</span>

The following table provides the latest pre-trained models for 2-class beat classification task. Below we also provide additional details including training configuration, accuracy metrics, and hardware performance results for the models.
The following table provides the latest pre-trained model for 2-class beat classification task. Below we also provide additional details including training configuration, performance metrics, and downloads.

--8<-- "assets/zoo/beat-2-eff-sm/results.md"

---

## <span class="sk-h2-span">Input</span>

The model is trained on 5-second, raw ECG frames sampled at 100 Hz.

- **Sensor**: ECG
- **Location**: Wrist
- **Sampling Rate**: 100 Hz
Expand All @@ -19,7 +21,8 @@ The following table provides the latest pre-trained models for 2-class beat clas

## <span class="sk-h2-span">Class Mapping</span>

The model is trained on raw ECG data and is able to classify normal sinus rhythm (NSR) and premature atrial/ventricular contractions (PAC/PVC).
The model is able to classify normal sinus rhythm (NSR) and premature atrial/ventricular contractions (PAC/PVC).
The class mapping is as follows:

| Base Class | Target Class | Label |
| ------------- | ------------ | --------- |
Expand Down
Loading

0 comments on commit 40698aa

Please sign in to comment.