# prajxal/parkinson-s-disease-detection-with-qsvm architecture

> Architecture diagram of the GitHub repository prajxal/parkinson-s-disease-detection-with-qsvm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prajxal/parkinson-s-disease-detection-with-qsvm
- Repository: https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm

## Overview

This repository is a Parkinson’s detection research pipeline: MRI images are catalogued, converted to CNN embeddings, pooled by subject, then evaluated with classical classifiers and a quantum-kernel SVM. The main user entry point, `src/run_experiments.py`, coordinates those stages. The README also describes a voice-data classical baseline and embedding EDA; the checked-in voice data and EDA generator support those capabilities, though their full runtime wiring is not established by the sampled excerpts. Results include metrics and plots. The graph focuses on supported calls and documented capabilities; unsampled subsystem links are omitted.

Main entry points: [`src/pca_qs_pipeline.py`](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/pca_qs_pipeline.py) (PCA and cross-validation), [`src/run_experiments.py`](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/run_experiments.py) (Experiment runner), [`src/cnn_feature_extractor.py`](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/cnn_feature_extractor.py) (CNN feature extraction), [`src/embeddings_utils.py`](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/embeddings_utils.py) (Subject aggregation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Data inputs"]
  node_mri_data[("MRI image dataset")]
  node_voice_data[("Voice recordings data<br/>[parkinsons.data]")]
end

subgraph group_features["Image features"]
  node_runner["Experiment runner<br/>[run_experiments.py]"]
  node_manifest["Image manifest<br/>[data_loader.py]"]
  node_image_loader["Image dataset loader<br/>[data_loader.py]"]
  node_cnn["CNN feature extraction"]
  node_slice_embeddings[("Slice embeddings")]
  node_subject_pool["Subject aggregation"]
  node_subject_embeddings[("Subject embeddings")]
end

subgraph group_modeling["Model evaluation"]
  node_evaluation["PCA and cross-validation<br/>[pca_qs_pipeline.py]"]
  node_classical_models["Classical classifiers<br/>[pca_qs_pipeline.py]"]
  node_quantum_kernel["Quantum kernel<br/>[quantum_kernel.py]"]
  node_qsvm["QSVM and Nyström<br/>[pca_qs_pipeline.py]"]
  node_metrics["Evaluation metrics<br/>[eval_metrics.py]"]
end

subgraph group_analysis["EDA and results"]
  node_results["Experiment results"]
  node_eda_generator["EDA notebook generator"]
  node_eda["Embedding EDA<br/>[eda.ipynb]"]
  node_visuals["Result visualizations"]
end

node_researcher(("Researcher"))

node_researcher -->|"starts"| node_runner
node_runner -->|"runs extraction"| node_cnn
node_runner -->|"aggregates"| node_subject_pool
node_runner -->|"runs evaluation"| node_evaluation
node_mri_data -->|"scanned for images"| node_manifest
node_cnn -->|"builds if missing"| node_manifest
node_cnn -->|"loads images"| node_image_loader
node_image_loader -->|"reads records"| node_manifest
node_cnn -->|"writes"| node_slice_embeddings
node_subject_pool -->|"reads"| node_slice_embeddings
node_subject_pool -->|"reads labels"| node_manifest
node_subject_pool -->|"writes"| node_subject_embeddings
node_evaluation -->|"loads features"| node_subject_embeddings
node_evaluation -->|"trains"| node_classical_models
node_evaluation -->|"computes kernels"| node_quantum_kernel
node_evaluation -->|"trains"| node_qsvm
node_evaluation -->|"computes metrics"| node_metrics
node_evaluation -->|"writes results"| node_results
node_researcher -->|"requests analysis"| node_eda_generator
node_eda_generator -->|"generates notebook"| node_eda
node_eda -.->|"analyzes embeddings"| node_slice_embeddings
node_eda -.->|"analyzes embeddings"| node_subject_embeddings
node_researcher -->|"requests plots"| node_visuals
node_visuals -.->|"reads metrics"| node_results
node_voice_data -.->|"classical baseline data"| node_classical_models

click node_voice_data "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/parkinsons/parkinsons.data"
click node_runner "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/run_experiments.py"
click node_manifest "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/data_loader.py"
click node_image_loader "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/data_loader.py"
click node_cnn "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/cnn_feature_extractor.py"
click node_subject_pool "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/embeddings_utils.py"
click node_evaluation "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/pca_qs_pipeline.py"
click node_classical_models "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/pca_qs_pipeline.py"
click node_quantum_kernel "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/quantum_kernel.py"
click node_qsvm "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/pca_qs_pipeline.py"
click node_metrics "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/eval_metrics.py"
click node_eda_generator "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/generate_eda_notebook.py"
click node_eda "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/notebooks/eda.ipynb"
click node_visuals "https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/generate_visuals.py"

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_mri_data,node_voice_data toneBlue
class node_runner,node_manifest,node_image_loader,node_cnn,node_slice_embeddings,node_subject_pool,node_subject_embeddings toneAmber
class node_evaluation,node_classical_models,node_quantum_kernel,node_qsvm,node_metrics toneMint
class node_results,node_eda_generator,node_eda,node_visuals toneRose
class node_researcher toneIndigo
```

## Components

### Data inputs

- **MRI image dataset**
- [Voice recordings data](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/parkinsons/parkinsons.data): `parkinsons/parkinsons.data`

### Image features

- [Experiment runner](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/run_experiments.py): `src/run_experiments.py`
- [Image manifest](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/data_loader.py): `src/data_loader.py`
- [Image dataset loader](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/data_loader.py): `src/data_loader.py`
- [CNN feature extraction](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/cnn_feature_extractor.py): `src/cnn_feature_extractor.py`
- **Slice embeddings**
- [Subject aggregation](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/embeddings_utils.py): `src/embeddings_utils.py`
- **Subject embeddings**

### Model evaluation

- [PCA and cross-validation](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/pca_qs_pipeline.py): `src/pca_qs_pipeline.py`
- [Classical classifiers](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/pca_qs_pipeline.py): `src/pca_qs_pipeline.py`
- [Quantum kernel](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/quantum_kernel.py): `src/quantum_kernel.py`
- [QSVM and Nyström](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/pca_qs_pipeline.py): `src/pca_qs_pipeline.py`
- [Evaluation metrics](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/src/eval_metrics.py): `src/eval_metrics.py`

### EDA and results

- **Experiment results**
- [EDA notebook generator](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/generate_eda_notebook.py): `generate_eda_notebook.py`
- [Embedding EDA](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/notebooks/eda.ipynb): `notebooks/eda.ipynb`
- [Result visualizations](https://github.com/prajxal/parkinson-s-disease-detection-with-qsvm/blob/main/generate_visuals.py): `generate_visuals.py`

### Other components

- **Researcher**

## Connections

- Researcher → Experiment runner: starts
- Experiment runner → CNN feature extraction: runs extraction
- Experiment runner → Subject aggregation: aggregates
- Experiment runner → PCA and cross-validation: runs evaluation
- MRI image dataset → Image manifest: scanned for images
- CNN feature extraction → Image manifest: builds if missing
- CNN feature extraction → Image dataset loader: loads images
- Image dataset loader → Image manifest: reads records
- CNN feature extraction → Slice embeddings: writes
- Subject aggregation → Slice embeddings: reads
- Subject aggregation → Image manifest: reads labels
- Subject aggregation → Subject embeddings: writes
- PCA and cross-validation → Subject embeddings: loads features
- PCA and cross-validation → Classical classifiers: trains
- PCA and cross-validation → Quantum kernel: computes kernels
- PCA and cross-validation → QSVM and Nyström: trains
- PCA and cross-validation → Evaluation metrics: computes metrics
- PCA and cross-validation → Experiment results: writes results
- Researcher → EDA notebook generator: requests analysis
- EDA notebook generator → Embedding EDA: generates notebook
- Embedding EDA → Slice embeddings: analyzes embeddings
- Embedding EDA → Subject embeddings: analyzes embeddings
- Researcher → Result visualizations: requests plots
- Result visualizations → Experiment results: reads metrics
- Voice recordings data → Classical classifiers: classical baseline data
