# guru21207/sct_ml_1 architecture

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

- Interactive diagram: https://gitdiagram.com/guru21207/sct_ml_1
- Repository: https://github.com/guru21207/sct_ml_1

## Overview

This repository is a small house-price prediction workflow. A user trains a linear-regression model from the Kaggle training data; the training script also evaluates and visualizes its predictions before saving the model. A separate prediction script loads that saved model and Kaggle test data, then writes a submission CSV. The README documents both stages. The graph keeps evaluation with training because it is implemented in the same script; no separate serving or preprocessing subsystem is evident.

Main entry points: [`src/predict_model.py`](https://github.com/guru21207/sct_ml_1/blob/main/src/predict_model.py) (Generate predictions), [`src/train_model.py`](https://github.com/guru21207/sct_ml_1/blob/main/src/train_model.py) (Train and evaluate), [`model/house_price_model.pkl`](https://github.com/guru21207/sct_ml_1/blob/main/model/house_price_model.pkl) (Trained model), [`dataset/train.csv`](https://github.com/guru21207/sct_ml_1/blob/main/dataset/train.csv) (Training dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Training and evaluation"]
  node_train_script["Train and evaluate<br/>[train_model.py]"]
end

subgraph group_artifacts["Data and artifacts"]
  node_training_data["Training dataset<br/>[train.csv]"]
  node_saved_model[("Trained model")]
  node_test_data["Kaggle test dataset<br/>[test.csv]"]
  node_submission["Prediction submission<br/>[submission.csv]"]
end

subgraph group_prediction["Prediction"]
  node_predict_script["Generate predictions<br/>[predict_model.py]"]
end

node_user(("Workflow user"))

node_user -->|"runs training"| node_train_script
node_train_script -->|"reads"| node_training_data
node_train_script -->|"saves model"| node_saved_model
node_user -->|"runs prediction"| node_predict_script
node_predict_script -->|"loads model"| node_saved_model
node_predict_script -->|"reads"| node_test_data
node_predict_script -->|"writes predictions"| node_submission

click node_train_script "https://github.com/guru21207/sct_ml_1/blob/main/src/train_model.py"
click node_training_data "https://github.com/guru21207/sct_ml_1/blob/main/dataset/train.csv"
click node_saved_model "https://github.com/guru21207/sct_ml_1/blob/main/model/house_price_model.pkl"
click node_predict_script "https://github.com/guru21207/sct_ml_1/blob/main/src/predict_model.py"
click node_test_data "https://github.com/guru21207/sct_ml_1/blob/main/dataset/test.csv"
click node_submission "https://github.com/guru21207/sct_ml_1/blob/main/submission.csv"

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_train_script,node_user toneBlue
class node_training_data,node_saved_model,node_test_data,node_submission toneAmber
class node_predict_script toneMint
```

## Components

### Training and evaluation

- [Train and evaluate](https://github.com/guru21207/sct_ml_1/blob/main/src/train_model.py): `src/train_model.py`

### Data and artifacts

- [Training dataset](https://github.com/guru21207/sct_ml_1/blob/main/dataset/train.csv): `dataset/train.csv`
- [Trained model](https://github.com/guru21207/sct_ml_1/blob/main/model/house_price_model.pkl): `model/house_price_model.pkl`
- [Kaggle test dataset](https://github.com/guru21207/sct_ml_1/blob/main/dataset/test.csv): `dataset/test.csv`
- [Prediction submission](https://github.com/guru21207/sct_ml_1/blob/main/submission.csv): `submission.csv`

### Prediction

- [Generate predictions](https://github.com/guru21207/sct_ml_1/blob/main/src/predict_model.py): `src/predict_model.py`

### Other components

- **Workflow user**

## Connections

- Workflow user → Train and evaluate: runs training (evidence: `README.md`)
- Train and evaluate → Training dataset: reads (evidence: `src/train_model.py`)
- Train and evaluate → Trained model: saves model (evidence: `src/train_model.py`)
- Workflow user → Generate predictions: runs prediction (evidence: `README.md`)
- Generate predictions → Trained model: loads model (evidence: `src/predict_model.py`)
- Generate predictions → Kaggle test dataset: reads (evidence: `src/predict_model.py`)
- Generate predictions → Prediction submission: writes predictions (evidence: `src/predict_model.py`)
