# rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch architecture

> Architecture diagram of the GitHub repository rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch
- Repository: https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch

## Overview

This repository is presented as a battery Remaining Useful Life prediction research notebook. The documented workflow takes battery data through preprocessing, compares three linear-regression approaches, and evaluates their predictions with standard metrics and the BaryMetric before diagnosing model fit. The tree contains only the notebook and README; no notebook source was available, so component paths point to the notebook and relationships reflect documented flow only. The README names a CSV input, but it is not present in the supplied tree.

Main entry points: [`Project ML-RUL Prediction-VF.ipynb`](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb) (Metric Evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Data Preparation"]
  node_rename["Feature Renaming"]
  node_missing["Missing-Value Simulation"]
  node_spectral["Spectral Analysis"]
  node_imputer["Spatial KNN Imputer"]
  node_outliers["IQR Outlier Capping"]
  node_scaling["Scaling and Normalization"]
  node_split["Data Splitting"]
end

subgraph group_model["Regression Models"]
  node_ols["OLS Regression"]
  node_bgd["Batch Gradient Descent"]
  node_sgd["Stochastic Gradient Descent"]
end

subgraph group_eval["Evaluation"]
  node_evaluation["Metric Evaluation"]
  node_barymetric["BaryMetric"]
end

subgraph group_diagnostics["Diagnostics"]
  node_diagnosis["Bias-Variance Diagnosis"]
  node_plots["Convergence Plots"]
end

node_researcher(("Researcher"))
node_dataset["Battery RUL Data"]
node_notebook["RUL Notebook"]

node_researcher -->|"runs"| node_notebook
node_dataset -->|"provides data"| node_rename
node_rename -->|"renames features"| node_missing
node_missing -->|"simulates failures"| node_spectral
node_spectral -->|"analyzes variance"| node_imputer
node_imputer -->|"imputes values"| node_outliers
node_outliers -->|"caps outliers"| node_scaling
node_scaling -->|"scales features"| node_split
node_split -->|"trains model"| node_ols
node_split -->|"trains model"| node_bgd
node_split -->|"trains model"| node_sgd
node_ols -->|"evaluates predictions"| node_evaluation
node_bgd -->|"evaluates predictions"| node_evaluation
node_sgd -->|"evaluates predictions"| node_evaluation
node_evaluation -->|"computes composite"| node_barymetric
node_evaluation -->|"checks generalization"| node_diagnosis
node_evaluation -->|"plots convergence"| node_plots

click node_notebook "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_rename "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_missing "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_spectral "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_imputer "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_outliers "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_scaling "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_split "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_ols "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_bgd "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_sgd "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_evaluation "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_barymetric "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_diagnosis "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"
click node_plots "https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb"

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_rename,node_missing,node_spectral,node_imputer,node_outliers,node_scaling,node_split toneBlue
class node_ols,node_bgd,node_sgd toneAmber
class node_evaluation,node_barymetric toneMint
class node_diagnosis,node_plots toneRose
class node_researcher,node_dataset toneIndigo
class node_notebook toneTeal
```

## Components

### Data Preparation

- [Feature Renaming](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [Missing-Value Simulation](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [Spectral Analysis](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [Spatial KNN Imputer](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [IQR Outlier Capping](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [Scaling and Normalization](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [Data Splitting](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`

### Regression Models

- [OLS Regression](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [Batch Gradient Descent](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [Stochastic Gradient Descent](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`

### Evaluation

- [Metric Evaluation](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [BaryMetric](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`

### Diagnostics

- [Bias-Variance Diagnosis](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`
- [Convergence Plots](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`

### Other components

- **Researcher**
- **Battery RUL Data**
- [RUL Notebook](https://github.com/rayan-web790/project-machine-learning-battery-rul-prediction-from-scratch/blob/main/Project%20ML-RUL%20Prediction-VF.ipynb): `Project ML-RUL Prediction-VF.ipynb`

## Connections

- Researcher → RUL Notebook: runs (evidence: `README.md`)
- Battery RUL Data → Feature Renaming: provides data (evidence: `README.md`)
- Feature Renaming → Missing-Value Simulation: renames features (evidence: `README.md`)
- Missing-Value Simulation → Spectral Analysis: simulates failures (evidence: `README.md`)
- Spectral Analysis → Spatial KNN Imputer: analyzes variance (evidence: `README.md`)
- Spatial KNN Imputer → IQR Outlier Capping: imputes values (evidence: `README.md`)
- IQR Outlier Capping → Scaling and Normalization: caps outliers (evidence: `README.md`)
- Scaling and Normalization → Data Splitting: scales features (evidence: `README.md`)
- Data Splitting → OLS Regression: trains model (evidence: `README.md`)
- Data Splitting → Batch Gradient Descent: trains model (evidence: `README.md`)
- Data Splitting → Stochastic Gradient Descent: trains model (evidence: `README.md`)
- OLS Regression → Metric Evaluation: evaluates predictions (evidence: `README.md`)
- Batch Gradient Descent → Metric Evaluation: evaluates predictions (evidence: `README.md`)
- Stochastic Gradient Descent → Metric Evaluation: evaluates predictions (evidence: `README.md`)
- Metric Evaluation → BaryMetric: computes composite (evidence: `README.md`)
- Metric Evaluation → Bias-Variance Diagnosis: checks generalization (evidence: `README.md`)
- Metric Evaluation → Convergence Plots: plots convergence (evidence: `README.md`)
