# nazrinburz/mle-ai-final-project architecture

> Architecture diagram of the GitHub repository nazrinburz/mle-ai-final-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nazrinburz/mle-ai-final-project
- Repository: https://github.com/nazrinburz/mle-ai-final-project

## Overview

This repository is a machine-learning research project for predicting Azerbaijani property sale prices and price tiers. Its main workflow retrieves or accepts the joined listings dataset, prepares features, runs model selection and matched regression/classification evaluations, and saves metrics, predictions, and error summaries. It includes custom tree, SVM, random-forest, Ridge, and SVR implementations alongside scikit-learn comparison baselines. The graph focuses on runtime and scientific-analysis components; several model-selection and cross-validation details are documented but only partly visible in the excerpts.

Main entry points: [`src/run_all.py`](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/run_all.py) (Evaluation runner), [`src/fetch_dataset.py`](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/fetch_dataset.py) (Dataset retrieval), [`src/data_prep.py`](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/data_prep.py) (Cleaning and features), [`src/random_forest.py`](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/random_forest.py) (Random forest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_dataset["Joined listings"]
  node_fetch["Dataset retrieval<br/>[fetch_dataset.py]"]
  node_prep["Cleaning and features<br/>[data_prep.py]"]
end

subgraph group_models["Prediction models"]
  node_tree["Decision tree<br/>[decision_tree.py]"]
  node_forest["Random forest<br/>[random_forest.py]"]
  node_svm["Pegasos SVM<br/>[svm.py]"]
  node_ridge["Ridge regression<br/>[linear_baseline.py]"]
  node_svr["Pegasos SVR<br/>[linear_baseline.py]"]
  node_sklearn["Sklearn baselines<br/>[run_all.py]"]
  node_sweeps["SVM experiments<br/>[svm_experiments.py]"]
end

subgraph group_analysis["Evaluation"]
  node_runner["Evaluation runner<br/>[run_all.py]"]
  node_metrics["Metrics<br/>[evaluate.py]"]
  node_results["Evaluation artifacts"]
end

node_user(("Analyst"))
node_gitlfs["Git LFS"]

node_user -->|"requests dataset"| node_fetch
node_fetch -->|"fetches export"| node_gitlfs
node_gitlfs -.->|"supplies dataset"| node_dataset
node_user -->|"runs evaluation"| node_runner
node_dataset -->|"loads listings"| node_prep
node_prep -->|"prepares split"| node_runner
node_runner -->|"trains models"| node_tree
node_runner -->|"trains models"| node_forest
node_runner -->|"trains models"| node_svm
node_runner -->|"trains models"| node_ridge
node_runner -->|"trains models"| node_svr
node_runner -->|"fits baselines"| node_sklearn
node_forest -->|"builds trees"| node_tree
node_sweeps -->|"fits candidates"| node_svm
node_runner -->|"computes scores"| node_metrics
node_runner -->|"writes results"| node_results

click node_fetch "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/fetch_dataset.py"
click node_prep "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/data_prep.py"
click node_tree "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/decision_tree.py"
click node_forest "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/random_forest.py"
click node_svm "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/svm.py"
click node_ridge "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/linear_baseline.py"
click node_svr "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/linear_baseline.py"
click node_sklearn "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/run_all.py"
click node_sweeps "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/svm_experiments.py"
click node_runner "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/run_all.py"
click node_metrics "https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/evaluate.py"
click node_results "https://github.com/nazrinburz/mle-ai-final-project/tree/main/report/evaluation-clean-log"

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_dataset,node_fetch,node_prep toneBlue
class node_tree,node_forest,node_svm,node_ridge,node_svr,node_sklearn,node_sweeps toneAmber
class node_runner,node_metrics,node_results toneMint
class node_user,node_gitlfs toneIndigo
```

## Components

### Data preparation

- **Joined listings**
- [Dataset retrieval](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/fetch_dataset.py): `src/fetch_dataset.py`
- [Cleaning and features](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/data_prep.py): `src/data_prep.py`

### Prediction models

- [Decision tree](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/decision_tree.py): `src/decision_tree.py`
- [Random forest](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/random_forest.py): `src/random_forest.py`
- [Pegasos SVM](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/svm.py): `src/svm.py`
- [Ridge regression](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/linear_baseline.py): `src/linear_baseline.py`
- [Pegasos SVR](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/linear_baseline.py): `src/linear_baseline.py`
- [Sklearn baselines](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/run_all.py): `src/run_all.py`
- [SVM experiments](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/svm_experiments.py): `src/svm_experiments.py`

### Evaluation

- [Evaluation runner](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/run_all.py): `src/run_all.py`
- [Metrics](https://github.com/nazrinburz/mle-ai-final-project/blob/main/src/evaluate.py): `src/evaluate.py`
- [Evaluation artifacts](https://github.com/nazrinburz/mle-ai-final-project/tree/main/report/evaluation-clean-log): `report/evaluation-clean-log`

### Other components

- **Analyst**
- **Git LFS**

## Connections

- Analyst → Dataset retrieval: requests dataset (evidence: `README.md`)
- Dataset retrieval → Git LFS: fetches export (evidence: `src/fetch_dataset.py`)
- Git LFS → Joined listings: supplies dataset
- Analyst → Evaluation runner: runs evaluation (evidence: `README.md`)
- Joined listings → Cleaning and features: loads listings (evidence: `src/data_prep.py`)
- Cleaning and features → Evaluation runner: prepares split (evidence: `README.md`)
- Evaluation runner → Decision tree: trains models (evidence: `src/run_all.py`)
- Evaluation runner → Random forest: trains models (evidence: `src/run_all.py`)
- Evaluation runner → Pegasos SVM: trains models (evidence: `src/run_all.py`)
- Evaluation runner → Ridge regression: trains models (evidence: `src/run_all.py`)
- Evaluation runner → Pegasos SVR: trains models (evidence: `src/run_all.py`)
- Evaluation runner → Sklearn baselines: fits baselines (evidence: `src/run_all.py`)
- Random forest → Decision tree: builds trees (evidence: `src/random_forest.py`)
- SVM experiments → Pegasos SVM: fits candidates (evidence: `src/svm_experiments.py`)
- Evaluation runner → Metrics: computes scores (evidence: `src/run_all.py`)
- Evaluation runner → Evaluation artifacts: writes results (evidence: `README.md`)
