# vihaanbishnoi/automl architecture

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

- Interactive diagram: https://gitdiagram.com/vihaanbishnoi/automl
- Repository: https://github.com/vihaanbishnoi/automl

## Overview

This is a Streamlit time-series regression recommender: users upload a CSV, choose its time/entity columns and prediction target/features, then run preprocessing, windowing and model training. The pipeline evaluates classical, deep-learning and (when eligible) ARIMA forecasts, sorts results by RMSE, and the UI displays metrics and the top recommendation. Edges reflect shown calls or SOURCE INDEX references; unsampled module behavior is not inferred.

Main entry points: [`services/model_recommender.py`](https://github.com/vihaanbishnoi/automl/blob/main/services/model_recommender.py) (Recommendation pipeline), [`trainers/deep_learning.py`](https://github.com/vihaanbishnoi/automl/blob/main/trainers/deep_learning.py) (Deep learning), [`app.py`](https://github.com/vihaanbishnoi/automl/blob/main/app.py) (Streamlit app), [`trainers/classical.py`](https://github.com/vihaanbishnoi/automl/blob/main/trainers/classical.py) (Classical training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_streamlit_app["Streamlit app<br/>[app.py]"]
end

subgraph group_preparation["Time-series preparation"]
  node_cleaning["Data cleaning<br/>[data_utils.py]"]
  node_windowing["Window creation<br/>[model_utils.py]"]
end

subgraph group_modeling["Model training"]
  node_pipeline["Recommendation pipeline"]
  node_classical_trainer["Classical training<br/>[classical.py]"]
  node_deep_trainer["Deep learning<br/>[deep_learning.py]"]
  node_statistical_trainer["Statistical training<br/>[statistical.py]"]
  node_random_forest["Random forest<br/>[random_forest.py]"]
  node_lstm["LSTM model<br/>[lstm.py]"]
  node_gru["GRU model<br/>[gru.py]"]
  node_cnn1d["1D CNN model<br/>[cnn1d.py]"]
  node_arima["ARIMA model<br/>[arima.py]"]
end

subgraph group_results["Evaluation and results"]
  node_metrics["Regression metrics"]
  node_results_view["Results display<br/>[plots.py]"]
end

node_user(("CSV user"))

node_user -->|"uploads CSV"| node_streamlit_app
node_streamlit_app -->|"runs pipeline"| node_pipeline
node_pipeline -->|"cleans data"| node_cleaning
node_pipeline -->|"creates windows"| node_windowing
node_pipeline -->|"trains models"| node_classical_trainer
node_pipeline -->|"trains models"| node_deep_trainer
node_pipeline -->|"trains models"| node_statistical_trainer
node_classical_trainer -->|"trains model"| node_random_forest
node_classical_trainer -->|"evaluates predictions"| node_metrics
node_deep_trainer -->|"builds model"| node_lstm
node_deep_trainer -->|"builds model"| node_gru
node_deep_trainer -->|"builds model"| node_cnn1d
node_deep_trainer -->|"evaluates predictions"| node_metrics
node_statistical_trainer -->|"fits and forecasts"| node_arima
node_statistical_trainer -->|"evaluates forecasts"| node_metrics
node_streamlit_app -->|"displays results"| node_results_view

click node_streamlit_app "https://github.com/vihaanbishnoi/automl/blob/main/app.py"
click node_pipeline "https://github.com/vihaanbishnoi/automl/blob/main/services/model_recommender.py"
click node_cleaning "https://github.com/vihaanbishnoi/automl/blob/main/data_utils.py"
click node_windowing "https://github.com/vihaanbishnoi/automl/blob/main/model_utils.py"
click node_classical_trainer "https://github.com/vihaanbishnoi/automl/blob/main/trainers/classical.py"
click node_deep_trainer "https://github.com/vihaanbishnoi/automl/blob/main/trainers/deep_learning.py"
click node_statistical_trainer "https://github.com/vihaanbishnoi/automl/blob/main/trainers/statistical.py"
click node_random_forest "https://github.com/vihaanbishnoi/automl/blob/main/models/random_forest.py"
click node_lstm "https://github.com/vihaanbishnoi/automl/blob/main/models/lstm.py"
click node_gru "https://github.com/vihaanbishnoi/automl/blob/main/models/gru.py"
click node_cnn1d "https://github.com/vihaanbishnoi/automl/blob/main/models/cnn1d.py"
click node_arima "https://github.com/vihaanbishnoi/automl/blob/main/models/arima.py"
click node_metrics "https://github.com/vihaanbishnoi/automl/blob/main/evaluation_utils.py"
click node_results_view "https://github.com/vihaanbishnoi/automl/blob/main/visualization/plots.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_streamlit_app,node_user toneBlue
class node_cleaning,node_windowing toneAmber
class node_pipeline,node_classical_trainer,node_deep_trainer,node_statistical_trainer,node_random_forest,node_lstm,node_gru,node_cnn1d,node_arima toneMint
class node_metrics,node_results_view toneRose
```

## Components

### User interface

- [Streamlit app](https://github.com/vihaanbishnoi/automl/blob/main/app.py): `app.py`

### Time-series preparation

- [Data cleaning](https://github.com/vihaanbishnoi/automl/blob/main/data_utils.py): `data_utils.py`
- [Window creation](https://github.com/vihaanbishnoi/automl/blob/main/model_utils.py): `model_utils.py`

### Model training

- [Recommendation pipeline](https://github.com/vihaanbishnoi/automl/blob/main/services/model_recommender.py): `services/model_recommender.py`
- [Classical training](https://github.com/vihaanbishnoi/automl/blob/main/trainers/classical.py): `trainers/classical.py`
- [Deep learning](https://github.com/vihaanbishnoi/automl/blob/main/trainers/deep_learning.py): `trainers/deep_learning.py`
- [Statistical training](https://github.com/vihaanbishnoi/automl/blob/main/trainers/statistical.py): `trainers/statistical.py`
- [Random forest](https://github.com/vihaanbishnoi/automl/blob/main/models/random_forest.py): `models/random_forest.py`
- [LSTM model](https://github.com/vihaanbishnoi/automl/blob/main/models/lstm.py): `models/lstm.py`
- [GRU model](https://github.com/vihaanbishnoi/automl/blob/main/models/gru.py): `models/gru.py`
- [1D CNN model](https://github.com/vihaanbishnoi/automl/blob/main/models/cnn1d.py): `models/cnn1d.py`
- [ARIMA model](https://github.com/vihaanbishnoi/automl/blob/main/models/arima.py): `models/arima.py`

### Evaluation and results

- [Regression metrics](https://github.com/vihaanbishnoi/automl/blob/main/evaluation_utils.py): `evaluation_utils.py`
- [Results display](https://github.com/vihaanbishnoi/automl/blob/main/visualization/plots.py): `visualization/plots.py`

### Other components

- **CSV user**

## Connections

- CSV user → Streamlit app: uploads CSV (evidence: `app.py`)
- Streamlit app → Recommendation pipeline: runs pipeline (evidence: `app.py`)
- Recommendation pipeline → Data cleaning: cleans data (evidence: `services/model_recommender.py`)
- Recommendation pipeline → Window creation: creates windows (evidence: `services/model_recommender.py`)
- Recommendation pipeline → Classical training: trains models (evidence: `services/model_recommender.py`)
- Recommendation pipeline → Deep learning: trains models (evidence: `services/model_recommender.py`)
- Recommendation pipeline → Statistical training: trains models (evidence: `services/model_recommender.py`)
- Classical training → Random forest: trains model (evidence: `trainers/classical.py`)
- Classical training → Regression metrics: evaluates predictions (evidence: `trainers/classical.py`)
- Deep learning → LSTM model: builds model (evidence: `trainers/deep_learning.py`)
- Deep learning → GRU model: builds model (evidence: `trainers/deep_learning.py`)
- Deep learning → 1D CNN model: builds model (evidence: `trainers/deep_learning.py`)
- Deep learning → Regression metrics: evaluates predictions (evidence: `trainers/deep_learning.py`)
- Statistical training → ARIMA model: fits and forecasts (evidence: `trainers/statistical.py`)
- Statistical training → Regression metrics: evaluates forecasts (evidence: `trainers/statistical.py`)
- Streamlit app → Results display: displays results (evidence: `app.py`)
