# anchal27sri/ml-gui-using-pyqt5 architecture

> Architecture diagram of the GitHub repository anchal27sri/ml-gui-using-pyqt5, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anchal27sri/ml-gui-using-pyqt5
- Repository: https://github.com/anchal27sri/ml-gui-using-pyqt5

## Overview

This is a desktop GUI for training and evaluating classification models from CSV datasets. Users choose SVM, Decision Tree, or MLP, select a file and parameters, then run training and view classification metrics and a confusion-matrix visualization. The MLP flow also offers a layer-configuration window. The graph separates GUI entry and model selection, configuration, and model execution/results. Relationships are based on the README and shown source excerpts; unsampled modules are represented only where the source index documents their connection.

Main entry points: [`scripts/MLPRunner.py`](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLPRunner.py) (MLP controls), [`scripts/MainRunner.py`](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MainRunner.py) (Model menu), [`scripts/SVMRunner.py`](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/SVMRunner.py) (SVM controls), [`scripts/DecisionTreeRunner.py`](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecisionTreeRunner.py) (Tree controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_main_menu["Model menu<br/>[MainRunner.py]"]
  node_svm_ui["SVM controls<br/>[SVMRunner.py]"]
  node_tree_ui["Tree controls"]
  node_mlp_ui["MLP controls<br/>[MLPRunner.py]"]
  node_result_dialog["Results dialog<br/>[SVMRunner.py]"]
end

subgraph group_configuration["Model configuration"]
  node_mlp_config["Layer configuration<br/>[make_model.py]"]
end

subgraph group_execution["Training and results"]
  node_svm_train["SVM training<br/>[svm.py]"]
  node_tree_train["Tree training<br/>[DecesionTree.py]"]
  node_mlp_train["MLP training<br/>[MLP.py]"]
  node_split_scale["Split and scale<br/>[svm.py]"]
  node_tree_split_scale["Split and scale<br/>[DecesionTree.py]"]
  node_mlp_split_scale["Split and scale<br/>[MLP.py]"]
  node_svm_results["Metrics and matrix<br/>[svm.py]"]
  node_tree_results["Metrics and matrix<br/>[DecesionTree.py]"]
  node_mlp_results["Metrics and plots<br/>[MLP.py]"]
end

node_user(("User"))
node_csv["CSV dataset"]

node_user -->|"chooses model"| node_main_menu
node_main_menu -->|"opens SVM"| node_svm_ui
node_main_menu -->|"opens tree"| node_tree_ui
node_main_menu -->|"opens MLP"| node_mlp_ui
node_user -->|"selects file"| node_csv
node_svm_ui -->|"runs"| node_svm_train
node_tree_ui -->|"runs"| node_tree_train
node_mlp_ui -->|"configures model"| node_mlp_config
node_mlp_config -->|"enables window"| node_mlp_ui
node_mlp_ui -->|"runs"| node_mlp_train
node_mlp_ui -->|"supplies model"| node_mlp_config
node_svm_train -->|"splits and scales"| node_split_scale
node_tree_train -->|"splits and scales"| node_tree_split_scale
node_mlp_train -->|"splits and scales"| node_mlp_split_scale
node_svm_train -->|"computes"| node_svm_results
node_tree_train -->|"computes"| node_tree_results
node_mlp_train -->|"computes and plots"| node_mlp_results
node_svm_ui -->|"shows results"| node_result_dialog
node_tree_ui -.->|"shows results"| node_result_dialog
node_mlp_ui -.->|"shows results"| node_result_dialog

click node_main_menu "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MainRunner.py"
click node_svm_ui "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/SVMRunner.py"
click node_tree_ui "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecisionTreeRunner.py"
click node_mlp_ui "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLPRunner.py"
click node_mlp_config "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/make_model.py"
click node_svm_train "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/svm.py"
click node_tree_train "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecesionTree.py"
click node_mlp_train "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLP.py"
click node_split_scale "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/svm.py"
click node_tree_split_scale "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecesionTree.py"
click node_mlp_split_scale "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLP.py"
click node_svm_results "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/svm.py"
click node_tree_results "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecesionTree.py"
click node_mlp_results "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLP.py"
click node_result_dialog "https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/SVMRunner.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_main_menu,node_svm_ui,node_tree_ui,node_mlp_ui,node_result_dialog,node_user toneBlue
class node_mlp_config toneAmber
class node_svm_train,node_tree_train,node_mlp_train,node_split_scale,node_tree_split_scale,node_mlp_split_scale,node_svm_results,node_tree_results,node_mlp_results toneMint
class node_csv toneIndigo
```

## Components

### Application entry

- [Model menu](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MainRunner.py): `scripts/MainRunner.py`
- [SVM controls](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/SVMRunner.py): `scripts/SVMRunner.py`
- [Tree controls](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecisionTreeRunner.py): `scripts/DecisionTreeRunner.py`
- [MLP controls](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLPRunner.py): `scripts/MLPRunner.py`
- [Results dialog](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/SVMRunner.py): `scripts/SVMRunner.py`

### Model configuration

- [Layer configuration](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/make_model.py): `scripts/make_model.py`

### Training and results

- [SVM training](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/svm.py): `scripts/svm.py`
- [Tree training](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecesionTree.py): `scripts/DecesionTree.py`
- [MLP training](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLP.py): `scripts/MLP.py`
- [Split and scale](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/svm.py): `scripts/svm.py`
- [Split and scale](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecesionTree.py): `scripts/DecesionTree.py`
- [Split and scale](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLP.py): `scripts/MLP.py`
- [Metrics and matrix](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/svm.py): `scripts/svm.py`
- [Metrics and matrix](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/DecesionTree.py): `scripts/DecesionTree.py`
- [Metrics and plots](https://github.com/anchal27sri/ml-gui-using-pyqt5/blob/master/scripts/MLP.py): `scripts/MLP.py`

### Other components

- **User**
- **CSV dataset**

## Connections

- User → Model menu: chooses model (evidence: `scripts/MainRunner.py`)
- Model menu → SVM controls: opens SVM (evidence: `scripts/MainRunner.py`)
- Model menu → Tree controls: opens tree (evidence: `scripts/MainRunner.py`)
- Model menu → MLP controls: opens MLP (evidence: `scripts/MainRunner.py`)
- User → CSV dataset: selects file
- SVM controls → SVM training: runs (evidence: `scripts/SVMRunner.py`)
- Tree controls → Tree training: runs (evidence: `scripts/DecisionTreeRunner.py`)
- MLP controls → Layer configuration: configures model (evidence: `scripts/MLPRunner.py`)
- Layer configuration → MLP controls: enables window (evidence: `scripts/make_model.py`)
- MLP controls → MLP training: runs (evidence: `scripts/MLPRunner.py`)
- MLP controls → Layer configuration: supplies model (evidence: `scripts/MLPRunner.py`)
- SVM training → Split and scale: splits and scales (evidence: `scripts/svm.py`)
- Tree training → Split and scale: splits and scales (evidence: `scripts/DecesionTree.py`)
- MLP training → Split and scale: splits and scales (evidence: `scripts/MLP.py`)
- SVM training → Metrics and matrix: computes (evidence: `scripts/svm.py`)
- Tree training → Metrics and matrix: computes (evidence: `scripts/DecesionTree.py`)
- MLP training → Metrics and plots: computes and plots (evidence: `scripts/MLP.py`)
- SVM controls → Results dialog: shows results (evidence: `scripts/SVMRunner.py`)
- Tree controls → Results dialog: shows results
- MLP controls → Results dialog: shows results
