# alperenndemirbas/gold-price-regression architecture

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

- Interactive diagram: https://gitdiagram.com/alperenndemirbas/gold-price-regression
- Repository: https://github.com/alperenndemirbas/gold-price-regression

## Overview

This is a small gold-price regression application. Its main workflow loads the example financial dataset, preprocesses and scales it, selects features, trains and evaluates a regression model, then saves the model and scaler for optional prediction on new data. The README documents these capabilities; the graph uses the shown code for call and data-flow evidence.

Main entry points: [`src/predict.py`](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/predict.py) (Prediction entry), [`src/main.py`](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/main.py) (Training entry), [`src/train.py`](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py) (Data loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Model training"]
  node_training_entry["Training entry<br/>[main.py]"]
  node_dataset["Financial dataset"]
  node_data_loading["Data loading<br/>[train.py]"]
  node_preprocessing["Preprocessing<br/>[train.py]"]
  node_scaling["Feature scaling<br/>[train.py]"]
  node_feature_selection["Feature selection<br/>[train.py]"]
  node_model_training["Model training<br/>[train.py]"]
  node_artifacts["Saved model and scaler"]
end

subgraph group_prediction["Prediction"]
  node_prediction_entry["Prediction entry<br/>[predict.py]"]
  node_new_data["New input data"]
  node_prediction["Price prediction<br/>[predict.py]"]
end

node_user(("User"))

node_user -->|"runs"| node_training_entry
node_training_entry -->|"loads"| node_data_loading
node_dataset -->|"read by"| node_data_loading
node_training_entry -->|"preprocesses"| node_preprocessing
node_training_entry -->|"scales"| node_scaling
node_training_entry -->|"selects features"| node_feature_selection
node_training_entry -->|"trains"| node_model_training
node_model_training -->|"saves"| node_artifacts
node_user -->|"runs"| node_prediction_entry
node_new_data -->|"supplies"| node_prediction_entry
node_artifacts -->|"loads"| node_prediction_entry
node_prediction_entry -->|"loads data"| node_data_loading
node_prediction_entry -->|"preprocesses"| node_preprocessing
node_prediction_entry -->|"scales features"| node_scaling
node_prediction_entry -->|"predicts"| node_prediction

click node_training_entry "https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/main.py"
click node_data_loading "https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py"
click node_preprocessing "https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py"
click node_scaling "https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py"
click node_feature_selection "https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py"
click node_model_training "https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py"
click node_prediction_entry "https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/predict.py"
click node_prediction "https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/predict.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_training_entry,node_dataset,node_data_loading,node_preprocessing,node_scaling,node_feature_selection,node_model_training,node_artifacts,node_user toneBlue
class node_prediction_entry,node_new_data,node_prediction toneAmber
```

## Components

### Model training

- [Training entry](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/main.py): `src/main.py`
- **Financial dataset**
- [Data loading](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py): `src/train.py`
- [Preprocessing](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py): `src/train.py`
- [Feature scaling](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py): `src/train.py`
- [Feature selection](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py): `src/train.py`
- [Model training](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/train.py): `src/train.py`
- **Saved model and scaler**

### Prediction

- [Prediction entry](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/predict.py): `src/predict.py`
- **New input data**
- [Price prediction](https://github.com/alperenndemirbas/gold-price-regression/blob/master/src/predict.py): `src/predict.py`

### Other components

- **User**

## Connections

- User → Training entry: runs (evidence: `README.md`)
- Training entry → Data loading: loads (evidence: `src/main.py`)
- Financial dataset → Data loading: read by (evidence: `src/train.py`)
- Training entry → Preprocessing: preprocesses (evidence: `src/main.py`)
- Training entry → Feature scaling: scales (evidence: `src/main.py`)
- Training entry → Feature selection: selects features (evidence: `src/main.py`)
- Training entry → Model training: trains (evidence: `src/main.py`)
- Model training → Saved model and scaler: saves (evidence: `src/train.py`)
- User → Prediction entry: runs (evidence: `README.md`)
- New input data → Prediction entry: supplies (evidence: `src/predict.py`)
- Saved model and scaler → Prediction entry: loads (evidence: `src/predict.py`)
- Prediction entry → Data loading: loads data (evidence: `src/predict.py`)
- Prediction entry → Preprocessing: preprocesses (evidence: `src/predict.py`)
- Prediction entry → Feature scaling: scales features (evidence: `src/predict.py`)
- Prediction entry → Price prediction: predicts (evidence: `src/predict.py`)
