# flango2023/pulso_f2 architecture

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

- Interactive diagram: https://gitdiagram.com/flango2023/pulso_f2
- Repository: https://github.com/flango2023/pulso_f2

## Overview

Pulso Fase 2 is a notebook-based cardiology diagnosis prototype with three documented capabilities: rule-based symptom extraction and disease association, text-based risk classification with subgroup bias evaluation, and binary ECG classification. The README documents these workflows, but no notebook source was provided, so the graph shows only documented relationships.

Main entry points: [`notebooks/fase2_parte1_extracao.ipynb`](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte1_extracao.ipynb) (Symptom Extraction), [`data/sintomas_pacientes.txt`](https://github.com/flango2023/pulso_f2/blob/main/data/sintomas_pacientes.txt) (Simulated Reports), [`notebooks/fase2_parte2_classificador.ipynb`](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb) (TF-IDF Vectors), [`notebooks/fase2_iralém2_mlp_ecg.ipynb`](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_iral%C3%A9m2_mlp_ecg.ipynb) (Binary Class Mapping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_triage["Symptom Triage"]
  node_reports["Simulated Reports"]
  node_knowledge[("Knowledge Map")]
  node_extract["Symptom Extraction"]
  node_diagnosis["Disease Association"]
  node_genderaudit["Extraction Bias Analysis"]
end

subgraph group_risk["Risk Classification"]
  node_riskdata[("Labeled Risk Phrases<br/>[frases_risco.csv]")]
  node_tfidf["TF-IDF Vectors"]
  node_logistic["Logistic Regression"]
  node_metrics["Model Evaluation"]
  node_riskbias["Gender Bias Analysis"]
end

subgraph group_ecg["ECG Classification"]
  node_mitbih[("MIT-BIH Dataset")]
  node_classmap["Binary Class Mapping"]
  node_mlp["ECG MLP"]
  node_ecgresult["Normal or Abnormal"]
end

node_clinician(("Patient Reports"))

node_clinician -->|"supplies reports"| node_reports
node_reports -->|"reads reports"| node_extract
node_knowledge -->|"matches symptoms"| node_extract
node_extract -->|"associates diseases"| node_diagnosis
node_extract -->|"analyzes bias"| node_genderaudit
node_riskdata -->|"vectorizes phrases"| node_tfidf
node_tfidf -->|"trains model"| node_logistic
node_logistic -->|"evaluates model"| node_metrics
node_metrics -->|"audits subgroups"| node_riskbias
node_mitbih -->|"provides beats"| node_classmap
node_classmap -->|"feeds mapped classes"| node_mlp
node_mlp -->|"classifies beats"| node_ecgresult

click node_reports "https://github.com/flango2023/pulso_f2/blob/main/data/sintomas_pacientes.txt"
click node_knowledge "https://github.com/flango2023/pulso_f2/blob/main/data/mapa_conhecimento.csv"
click node_extract "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte1_extracao.ipynb"
click node_diagnosis "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte1_extracao.ipynb"
click node_genderaudit "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte1_extracao.ipynb"
click node_riskdata "https://github.com/flango2023/pulso_f2/blob/main/data/frases_risco.csv"
click node_tfidf "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb"
click node_logistic "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb"
click node_metrics "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb"
click node_riskbias "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb"
click node_classmap "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_iral%C3%A9m2_mlp_ecg.ipynb"
click node_mlp "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_iral%C3%A9m2_mlp_ecg.ipynb"
click node_ecgresult "https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_iral%C3%A9m2_mlp_ecg.ipynb"

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_reports,node_knowledge,node_extract,node_diagnosis,node_genderaudit toneBlue
class node_riskdata,node_tfidf,node_logistic,node_metrics,node_riskbias toneAmber
class node_mitbih,node_classmap,node_mlp,node_ecgresult toneMint
class node_clinician toneIndigo
```

## Components

### Symptom Triage

- [Simulated Reports](https://github.com/flango2023/pulso_f2/blob/main/data/sintomas_pacientes.txt): `data/sintomas_pacientes.txt`
- [Knowledge Map](https://github.com/flango2023/pulso_f2/blob/main/data/mapa_conhecimento.csv): `data/mapa_conhecimento.csv`
- [Symptom Extraction](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte1_extracao.ipynb): `notebooks/fase2_parte1_extracao.ipynb`
- [Disease Association](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte1_extracao.ipynb): `notebooks/fase2_parte1_extracao.ipynb`
- [Extraction Bias Analysis](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte1_extracao.ipynb): `notebooks/fase2_parte1_extracao.ipynb`

### Risk Classification

- [Labeled Risk Phrases](https://github.com/flango2023/pulso_f2/blob/main/data/frases_risco.csv): `data/frases_risco.csv`
- [TF-IDF Vectors](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb): `notebooks/fase2_parte2_classificador.ipynb`
- [Logistic Regression](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb): `notebooks/fase2_parte2_classificador.ipynb`
- [Model Evaluation](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb): `notebooks/fase2_parte2_classificador.ipynb`
- [Gender Bias Analysis](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_parte2_classificador.ipynb): `notebooks/fase2_parte2_classificador.ipynb`

### ECG Classification

- **MIT-BIH Dataset**
- [Binary Class Mapping](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_iral%C3%A9m2_mlp_ecg.ipynb): `notebooks/fase2_iralém2_mlp_ecg.ipynb`
- [ECG MLP](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_iral%C3%A9m2_mlp_ecg.ipynb): `notebooks/fase2_iralém2_mlp_ecg.ipynb`
- [Normal or Abnormal](https://github.com/flango2023/pulso_f2/blob/main/notebooks/fase2_iral%C3%A9m2_mlp_ecg.ipynb): `notebooks/fase2_iralém2_mlp_ecg.ipynb`

### Other components

- **Patient Reports**

## Connections

- Patient Reports → Simulated Reports: supplies reports (evidence: `README.md`)
- Simulated Reports → Symptom Extraction: reads reports (evidence: `README.md`)
- Knowledge Map → Symptom Extraction: matches symptoms (evidence: `README.md`)
- Symptom Extraction → Disease Association: associates diseases (evidence: `README.md`)
- Symptom Extraction → Extraction Bias Analysis: analyzes bias (evidence: `README.md`)
- Labeled Risk Phrases → TF-IDF Vectors: vectorizes phrases (evidence: `README.md`)
- TF-IDF Vectors → Logistic Regression: trains model (evidence: `README.md`)
- Logistic Regression → Model Evaluation: evaluates model (evidence: `README.md`)
- Model Evaluation → Gender Bias Analysis: audits subgroups (evidence: `README.md`)
- MIT-BIH Dataset → Binary Class Mapping: provides beats (evidence: `README.md`)
- Binary Class Mapping → ECG MLP: feeds mapped classes (evidence: `README.md`)
- ECG MLP → Normal or Abnormal: classifies beats (evidence: `README.md`)
