# mohamed20384/machine-learning-from-scratch architecture

> Architecture diagram of the GitHub repository mohamed20384/machine-learning-from-scratch, 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/mohamed20384/machine-learning-from-scratch
- Repository: https://github.com/mohamed20384/machine-learning-from-scratch

## Overview

This repository is a Jupyter notebook of machine-learning and graph-search implementations written from scratch. The documented workflow is to open and run the notebook to study algorithms and visualize results. The README identifies the capabilities, but no notebook source excerpts were provided, so the graph shows documented notebook contents rather than internal calls or execution order.

Main entry points: [`machine learning from scratch.ipynb`](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb) (Algorithm Notebook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_supervised["Supervised Learning"]
  node_linear["Linear Regression"]
  node_logistic["Logistic Regression"]
  node_tree["Decision Tree"]
  node_forest["Random Forest"]
  node_bayes["Naive Bayes"]
  node_svm["SVM"]
  node_knn["K-Nearest Neighbors"]
end

subgraph group_unsupervised["Unsupervised Learning"]
  node_kmeans["K-Means"]
  node_pca["PCA"]
  node_apriori["Apriori"]
end

subgraph group_deep["Deep Learning"]
  node_ann["Neural Network"]
  node_cnn["CNN"]
  node_rnn["RNN"]
end

subgraph group_other["Search &amp; Visualization"]
  node_bfs["Breadth-First Search"]
  node_dfs["Depth-First Search"]
  node_visualization["Result Visualizations"]
end

node_learner(("Learner"))
node_notebook["Algorithm Notebook"]

node_learner -->|"runs"| node_notebook
node_notebook -->|"implements"| node_linear
node_notebook -->|"implements"| node_logistic
node_notebook -->|"implements"| node_tree
node_notebook -->|"implements"| node_forest
node_notebook -->|"implements"| node_bayes
node_notebook -->|"implements"| node_svm
node_notebook -->|"implements"| node_knn
node_notebook -->|"implements"| node_kmeans
node_notebook -->|"implements"| node_pca
node_notebook -->|"implements"| node_apriori
node_notebook -->|"implements"| node_ann
node_notebook -->|"implements"| node_cnn
node_notebook -->|"implements"| node_rnn
node_notebook -->|"implements"| node_bfs
node_notebook -->|"implements"| node_dfs
node_notebook -->|"visualizes results"| node_visualization

click node_notebook "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_linear "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_logistic "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_tree "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_forest "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_bayes "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_svm "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_knn "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_kmeans "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_pca "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_apriori "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_ann "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_cnn "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_rnn "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_bfs "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_dfs "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb"
click node_visualization "https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.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_linear,node_logistic,node_tree,node_forest,node_bayes,node_svm,node_knn toneBlue
class node_kmeans,node_pca,node_apriori toneAmber
class node_ann,node_cnn,node_rnn toneMint
class node_bfs,node_dfs,node_visualization toneRose
class node_learner toneIndigo
class node_notebook toneTeal
```

## Components

### Supervised Learning

- [Linear Regression](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [Logistic Regression](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [Decision Tree](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [Random Forest](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [Naive Bayes](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [SVM](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [K-Nearest Neighbors](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`

### Unsupervised Learning

- [K-Means](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [PCA](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [Apriori](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`

### Deep Learning

- [Neural Network](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [CNN](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [RNN](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`

### Search & Visualization

- [Breadth-First Search](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [Depth-First Search](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`
- [Result Visualizations](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`

### Other components

- **Learner**
- [Algorithm Notebook](https://github.com/mohamed20384/machine-learning-from-scratch/blob/main/machine%20learning%20from%20scratch.ipynb): `machine learning from scratch.ipynb`

## Connections

- Learner → Algorithm Notebook: runs (evidence: `README.md`)
- Algorithm Notebook → Linear Regression: implements (evidence: `README.md`)
- Algorithm Notebook → Logistic Regression: implements (evidence: `README.md`)
- Algorithm Notebook → Decision Tree: implements (evidence: `README.md`)
- Algorithm Notebook → Random Forest: implements (evidence: `README.md`)
- Algorithm Notebook → Naive Bayes: implements (evidence: `README.md`)
- Algorithm Notebook → SVM: implements (evidence: `README.md`)
- Algorithm Notebook → K-Nearest Neighbors: implements (evidence: `README.md`)
- Algorithm Notebook → K-Means: implements (evidence: `README.md`)
- Algorithm Notebook → PCA: implements (evidence: `README.md`)
- Algorithm Notebook → Apriori: implements (evidence: `README.md`)
- Algorithm Notebook → Neural Network: implements (evidence: `README.md`)
- Algorithm Notebook → CNN: implements (evidence: `README.md`)
- Algorithm Notebook → RNN: implements (evidence: `README.md`)
- Algorithm Notebook → Breadth-First Search: implements (evidence: `README.md`)
- Algorithm Notebook → Depth-First Search: implements (evidence: `README.md`)
- Algorithm Notebook → Result Visualizations: visualizes results (evidence: `README.md`)
