# bdsp-core/icare-dl architecture

> Architecture diagram of the GitHub repository bdsp-core/icare-dl, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bdsp-core/icare-dl
- Repository: https://github.com/bdsp-core/icare-dl

## Overview

ICARE is a research implementation for predicting neurological outcomes after cardiac arrest from continuous EEG and admission characteristics using multiscale CNN-LSTM models. The README establishes that high-level workflow; filenames indicate separate clinical, short-IIC, and long-IIC scripts. Source excerpts were unavailable, so exact data loading, feature-extraction, and script-to-script wiring are not asserted.

Main entry points: [`deep_learning_multiscale_lstm.m`](https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm.m) (Multiscale CNN-LSTM)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Clinical inputs"]
  node_cohort(("ICARE cohort data"))
  node_edfreader["EDF reader<br/>[edfread.m]"]
  node_edfreader_done["Incremental EDF reader<br/>[edfreadUntilDone.m]"]
end

subgraph group_analysis["Signal analysis"]
  node_features_mat["Feature sequences"]
  node_supporting["EEG analysis functions"]
end

subgraph group_models["Outcome modeling"]
  node_main_model["Multiscale CNN-LSTM"]
  node_clinical_model["Clinical model"]
  node_short_model["Short-IIC model"]
  node_long_model["Long-IIC model"]
  node_model_fig1["Model figure analysis"]
  node_model_fig2["Model figure analysis"]
  node_outcomes(("Neurological outcome predictions"))
  node_clinical_results["Clinical summary results"]
end

node_cohort -->|"provides EEG and admission data"| node_main_model
node_main_model -->|"predicts outcome"| node_outcomes

click node_edfreader "https://github.com/bdsp-core/icare-dl/blob/main/edfread.m"
click node_edfreader_done "https://github.com/bdsp-core/icare-dl/blob/main/edfreadUntilDone.m"
click node_features_mat "https://github.com/bdsp-core/icare-dl/blob/main/features/mgh_features_sequences.mat"
click node_supporting "https://github.com/bdsp-core/icare-dl/tree/main/Supporting%20Functions"
click node_main_model "https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm.m"
click node_clinical_model "https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_iic_clinical.m"
click node_short_model "https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_short_iic.m"
click node_long_model "https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_long_iic.m"
click node_model_fig1 "https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_fig1.m"
click node_model_fig2 "https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_fig2.m"
click node_clinical_results "https://github.com/bdsp-core/icare-dl/blob/main/results/multi-lstm-summary-clinical_avg.mat"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cohort,node_edfreader,node_edfreader_done toneBlue
class node_features_mat,node_supporting toneAmber
class node_main_model,node_clinical_model,node_short_model,node_long_model,node_model_fig1,node_model_fig2,node_outcomes,node_clinical_results toneMint
```

## Components

### Clinical inputs

- **ICARE cohort data**
- [EDF reader](https://github.com/bdsp-core/icare-dl/blob/main/edfread.m): `edfread.m`
- [Incremental EDF reader](https://github.com/bdsp-core/icare-dl/blob/main/edfreadUntilDone.m): `edfreadUntilDone.m`

### Signal analysis

- [Feature sequences](https://github.com/bdsp-core/icare-dl/blob/main/features/mgh_features_sequences.mat): `features/mgh_features_sequences.mat`
- [EEG analysis functions](https://github.com/bdsp-core/icare-dl/tree/main/Supporting%20Functions): `Supporting Functions`

### Outcome modeling

- [Multiscale CNN-LSTM](https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm.m): `deep_learning_multiscale_lstm.m`
- [Clinical model](https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_iic_clinical.m): `deep_learning_multiscale_lstm_iic_clinical.m`
- [Short-IIC model](https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_short_iic.m): `deep_learning_multiscale_lstm_short_iic.m`
- [Long-IIC model](https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_long_iic.m): `deep_learning_multiscale_lstm_long_iic.m`
- [Model figure analysis](https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_fig1.m): `deep_learning_multiscale_lstm_fig1.m`
- [Model figure analysis](https://github.com/bdsp-core/icare-dl/blob/main/deep_learning_multiscale_lstm_fig2.m): `deep_learning_multiscale_lstm_fig2.m`
- **Neurological outcome predictions**
- [Clinical summary results](https://github.com/bdsp-core/icare-dl/blob/main/results/multi-lstm-summary-clinical_avg.mat): `results/multi-lstm-summary-clinical_avg.mat`

## Connections

- ICARE cohort data → Multiscale CNN-LSTM: provides EEG and admission data
- Multiscale CNN-LSTM → Neurological outcome predictions: predicts outcome
