# francescocartelli/machine-learning-put-together architecture

> Architecture diagram of the GitHub repository francescocartelli/machine-learning-put-together, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/francescocartelli/machine-learning-put-together
- Repository: https://github.com/francescocartelli/machine-learning-put-together

## Overview

This repository is a Python toolkit for classification, preprocessing, model evaluation, and result presentation. The main workflow is to supply feature matrices and labels, configure a Graph to run preprocessing and classifiers, evaluate scores against labels, and print or plot results. Graph scheduling is the internal orchestration layer: it dispatches fitting, training, transformation, and output collection according to node type. The README documents broader classifier and graph capabilities; some implementations were not sampled, so only documented or excerpt-supported relationships are shown.

Main entry points: [`src/graphs/graphs.py`](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/graphs/graphs.py) (Graph scheduler), [`src/utils.py`](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/utils.py) (Data utilities), [`src/preprocessing/pca.py`](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/pca.py) (PCA), [`src/preprocessing/lda.py`](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/lda.py) (LDA)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Graph orchestration"]
  node_graph["Graph scheduler<br/>[graphs.py]"]
  node_grids["Parameter grids<br/>[grids.py]"]
end

subgraph group_models["Preprocessing and models"]
  node_pca["PCA<br/>[pca.py]"]
  node_lda["LDA<br/>[lda.py]"]
  node_standard["Standardization<br/>[standard.py]"]
  node_gaussianization["Gaussianization<br/>[gaussianization.py]"]
  node_gaussian["Gaussian classifiers<br/>[gaussian_c.py]"]
  node_gmm["GMM classifier<br/>[gmm.py]"]
  node_logreg["Logistic regression<br/>[logistic_reg.py]"]
  node_svm["SVM and kernels<br/>[svm.py]"]
  node_stack["Score stacking<br/>[transformations.py]"]
  node_utils["Data utilities<br/>[utils.py]"]
end

subgraph group_evaluation["Evaluation and presentation"]
  node_metrics["Prediction metrics"]
  node_printing["Metrics printer<br/>[printing.py]"]
  node_plotting["Plots<br/>[plotting.py]"]
end

node_engineer(("Engineer"))
node_data["Feature data"]

node_engineer -->|"configures"| node_graph
node_engineer -->|"supplies"| node_data
node_data -->|"training inputs"| node_graph
node_graph -->|"dispatches transform"| node_pca
node_graph -->|"dispatches transform"| node_lda
node_graph -->|"dispatches transform"| node_standard
node_graph -->|"dispatches transform"| node_gaussianization
node_graph -->|"trains and scores"| node_gaussian
node_graph -->|"trains and scores"| node_gmm
node_graph -->|"trains and scores"| node_logreg
node_graph -->|"trains and scores"| node_svm
node_graph -->|"expands configurations"| node_grids
node_graph -->|"applies transform"| node_stack
node_graph -->|"dispatches output"| node_printing
node_graph -.->|"dispatches output"| node_plotting
node_printing -->|"computes DCF"| node_metrics
node_plotting -->|"computes curves"| node_metrics
node_gmm -->|"uses density helpers"| node_utils
node_gaussian -->|"uses statistics helpers"| node_utils
node_svm -->|"uses array helpers"| node_utils
node_pca -->|"uses covariance helper"| node_utils
node_lda -->|"uses matrix helper"| node_utils

click node_graph "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/graphs/graphs.py"
click node_grids "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/graphs/grids.py"
click node_pca "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/pca.py"
click node_lda "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/lda.py"
click node_standard "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/standard.py"
click node_gaussianization "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/gaussianization.py"
click node_gaussian "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/classifiers/gaussian_c.py"
click node_gmm "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/classifiers/gmm.py"
click node_logreg "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/classifiers/logistic_reg.py"
click node_svm "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/classifiers/svm.py"
click node_stack "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/transformations/transformations.py"
click node_metrics "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/measuring_predictions/measuring_predictions.py"
click node_printing "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/plotting/printing.py"
click node_plotting "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/plotting/plotting.py"
click node_utils "https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/utils.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_graph,node_grids toneBlue
class node_pca,node_lda,node_standard,node_gaussianization,node_gaussian,node_gmm,node_logreg,node_svm,node_stack,node_utils toneAmber
class node_metrics,node_printing,node_plotting toneMint
class node_engineer,node_data toneIndigo
```

## Components

### Graph orchestration

- [Graph scheduler](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/graphs/graphs.py): `src/graphs/graphs.py`
- [Parameter grids](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/graphs/grids.py): `src/graphs/grids.py`

### Preprocessing and models

- [PCA](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/pca.py): `src/preprocessing/pca.py`
- [LDA](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/lda.py): `src/preprocessing/lda.py`
- [Standardization](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/standard.py): `src/preprocessing/standard.py`
- [Gaussianization](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/preprocessing/gaussianization.py): `src/preprocessing/gaussianization.py`
- [Gaussian classifiers](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/classifiers/gaussian_c.py): `src/classifiers/gaussian_c.py`
- [GMM classifier](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/classifiers/gmm.py): `src/classifiers/gmm.py`
- [Logistic regression](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/classifiers/logistic_reg.py): `src/classifiers/logistic_reg.py`
- [SVM and kernels](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/classifiers/svm.py): `src/classifiers/svm.py`
- [Score stacking](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/transformations/transformations.py): `src/transformations/transformations.py`
- [Data utilities](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/utils.py): `src/utils.py`

### Evaluation and presentation

- [Prediction metrics](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/measuring_predictions/measuring_predictions.py): `src/measuring_predictions/measuring_predictions.py`
- [Metrics printer](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/plotting/printing.py): `src/plotting/printing.py`
- [Plots](https://github.com/francescocartelli/machine-learning-put-together/blob/master/src/plotting/plotting.py): `src/plotting/plotting.py`

### Other components

- **Engineer**
- **Feature data**

## Connections

- Engineer → Graph scheduler: configures (evidence: `README.md`)
- Engineer → Feature data: supplies (evidence: `README.md`)
- Feature data → Graph scheduler: training inputs (evidence: `src/graphs/graphs.py`)
- Graph scheduler → PCA: dispatches transform (evidence: `src/graphs/graphs.py`)
- Graph scheduler → LDA: dispatches transform (evidence: `src/graphs/graphs.py`)
- Graph scheduler → Standardization: dispatches transform (evidence: `src/graphs/graphs.py`)
- Graph scheduler → Gaussianization: dispatches transform (evidence: `src/graphs/graphs.py`)
- Graph scheduler → Gaussian classifiers: trains and scores (evidence: `README.md`)
- Graph scheduler → GMM classifier: trains and scores (evidence: `src/graphs/graphs.py`)
- Graph scheduler → Logistic regression: trains and scores (evidence: `README.md`)
- Graph scheduler → SVM and kernels: trains and scores (evidence: `README.md`)
- Graph scheduler → Parameter grids: expands configurations (evidence: `src/graphs/graphs.py`)
- Graph scheduler → Score stacking: applies transform (evidence: `src/transformations/transformations.py`)
- Graph scheduler → Metrics printer: dispatches output (evidence: `src/graphs/graphs.py`)
- Graph scheduler → Plots: dispatches output
- Metrics printer → Prediction metrics: computes DCF (evidence: `src/plotting/printing.py`)
- Plots → Prediction metrics: computes curves (evidence: `src/plotting/plotting.py`)
- GMM classifier → Data utilities: uses density helpers (evidence: `src/classifiers/gmm.py`)
- Gaussian classifiers → Data utilities: uses statistics helpers (evidence: `src/classifiers/gaussian_c.py`)
- SVM and kernels → Data utilities: uses array helpers (evidence: `src/classifiers/svm.py`)
- PCA → Data utilities: uses covariance helper (evidence: `src/preprocessing/pca.py`)
- LDA → Data utilities: uses matrix helper (evidence: `src/preprocessing/lda.py`)
