# otniel113/mvpcalculator-regresi architecture

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

- Interactive diagram: https://gitdiagram.com/otniel113/mvpcalculator-regresi
- Repository: https://github.com/otniel113/mvpcalculator-regresi

## Overview

##### Project type and purpose
- This is a data-analysis/machine-learning pipeline implemented as a Jupyter Notebook (MVPCalculator.ipynb).
- Its purpose is to compute an “MVP score” for Mobile Legends matches using linear regression.
- It ingests manually collected match data, preprocesses it, trains a model, evaluates it, and exposes a simple deployment endpoint.

##### Main components
a. Data Source
- Google Spreadsheet (manual match history).

b. Data Ingestion & Preprocessing
- Python/Pandas code in the notebook.
- Operations: drop “Gold” & “Minutes”, compute GPM, filter features by Pearson correlation.

c. Feature Selection
- Selection of features: kill, death, assist, gpm, teamfight_part, win, score.

d. Model Training
- Scikit-learn’s LinearRegression.
- Splitting data (80/20 train/test).

e. Model Evaluation
- Metrics: R2, RMSE, MAE.

f. Deployment / Inference
- The final regression formula is hosted as a lightweight service (URL: https://otnielabiezer.com/MVPCalculator/).
- Visual: parallelogram “Web UI / API” where users submit match stats and get MVP score.

g. Environment & Tools
- Jupyter Notebook, Python, Pandas, scikit-learn.

##### Relationships and data flows
- “Preprocessing” → “Training” (train split).
- “Preprocessing” → “Evaluation” (test split).
- “Training” → “Evaluation” (trained model).
- “Training” → “Deployment” (exported regression formula or model).
- “Web UI/API” → “Model” → “Response with MVP score”.

##### Architectural patterns and design principles
- ML Pipeline: clear separation between data ingestion, preprocessing, training, evaluation, and deployment.
- Reproducibility: everything lives inside one notebook but could be refactored into modules (.py) following pipeline stages.
- Modular design allows swapping out the regression algorithm or adding more features.

##### Detailed checklist
[ ] Raw Data (Google Sheet)
[ ] Data Preprocessing (drop, feature engineering)
[ ] Feature Selection (Pearson correlation)
[ ] Model Training (LinearRegression, train/test split)
[ ] Model Evaluation (R2, RMSE, MAE)
[ ] Deployment (Web UI/API endpoint)
[ ] Tools/Libs annotation (Pandas, scikit-learn, Jupyter)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Raw["Raw Match Data\n(Google Sheet)"]:::data
    Preprocess["Data Ingestion & Preprocessing"]:::process
    FeatureSel["Feature Selection\n(Pearson filtering)"]:::process
    Train["Model Training\n(LinearRegression,\ntrain/test split)"]:::process
    Eval["Model Evaluation\n(R², RMSE, MAE)"]:::eval
    Deploy["Web UI/API\nInference Service"]:::deploy
    Tools["Env & Tools:\nJupyter, Python, pandas,\nscikit-learn"]:::tools

    Raw -->|"raw data"| Preprocess
    Preprocess -->|"cleaned data"| FeatureSel
    FeatureSel -->|"training data"| Train
    FeatureSel -->|"test data"| Eval
    Train -->|"trained model"| Eval
    Train -->|"regression formula"| Deploy
    Deploy -->|"MVP score request/response"| Deploy
    Tools -.-> Preprocess
    Tools -.-> Train
    Tools -.-> Eval
    Tools -.-> Deploy

    click Raw "https://github.com/otniel113/mvpcalculator-regresi/blob/main/MVPCalculator.ipynb"
    click Preprocess "https://github.com/otniel113/mvpcalculator-regresi/blob/main/MVPCalculator.ipynb"
    click FeatureSel "https://github.com/otniel113/mvpcalculator-regresi/blob/main/MVPCalculator.ipynb"
    click Train "https://github.com/otniel113/mvpcalculator-regresi/blob/main/MVPCalculator.ipynb"
    click Eval "https://github.com/otniel113/mvpcalculator-regresi/blob/main/MVPCalculator.ipynb"
    click Deploy "https://github.com/otniel113/mvpcalculator-regresi/blob/main/README.md"
    click Tools "https://github.com/otniel113/mvpcalculator-regresi/blob/main/README.md"

    classDef data fill:#cfe2f3,stroke:#0b5394,color:#0b5394
    classDef process fill:#d9ead3,stroke:#38761d,color:#38761d
    classDef eval fill:#fce5cd,stroke:#e69138,color:#e69138
    classDef deploy fill:#d9d2e9,stroke:#674ea7,color:#674ea7
    classDef tools fill:#ffffff,stroke:#999999,color:#000000,font-style:italic
```
