# robinramdin13/digit_recognizer architecture

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

- Interactive diagram: https://gitdiagram.com/robinramdin13/digit_recognizer
- Repository: https://github.com/robinramdin13/digit_recognizer

## Overview

This is a small MNIST digit-recognition script, not a multi-service application. Its documented workflow loads Kaggle CSV data, prepares and augments training examples, trains a one-hidden-layer neural network, and evaluates accuracy. The README also describes saved sample plots and comparisons across noise levels. Source excerpts are partial, so the graph omits uncertain wiring for test prediction and output generation.

Main entry points: [`main.py`](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py) (Script entry point), [`plots`](https://github.com/robinramdin13/digit_recognizer/tree/main/plots) (Saved sample plots)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Data workflow"]
  node_entry["Script entry point<br/>[main.py]"]
  node_load["Load and split<br/>[main.py]"]
  node_augment["Noise augmentation<br/>[main.py]"]
  node_normalize["Pixel normalization<br/>[main.py]"]
  node_evaluate["Accuracy evaluation<br/>[main.py]"]
end

subgraph group_network["Neural network"]
  node_train["Gradient descent<br/>[main.py]"]
  node_forward["Forward propagation<br/>[main.py]"]
  node_backward["Backpropagation<br/>[main.py]"]
  node_updates["Parameter updates<br/>[main.py]"]
end

subgraph group_artifacts["Visual outputs"]
  node_plot["Sample plotting<br/>[main.py]"]
  node_plots["Saved sample plots"]
end

node_user(("Project user"))
node_csvdata["MNIST CSV data"]

node_user -->|"runs"| node_entry
node_entry -->|"calls"| node_load
node_load -->|"reads"| node_csvdata
node_load -->|"passes training data"| node_augment
node_augment -->|"returns augmented data"| node_normalize
node_normalize -->|"passes inputs"| node_train
node_train -->|"calls"| node_forward
node_train -->|"calls"| node_backward
node_train -->|"calls"| node_updates
node_entry -->|"evaluates"| node_evaluate
node_entry -.->|"plots samples"| node_plot
node_plot -.->|"saves"| node_plots

click node_entry "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_load "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_augment "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_normalize "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_train "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_forward "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_backward "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_updates "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_evaluate "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_plot "https://github.com/robinramdin13/digit_recognizer/blob/main/main.py"
click node_plots "https://github.com/robinramdin13/digit_recognizer/tree/main/plots"

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_entry,node_load,node_augment,node_normalize,node_evaluate,node_user toneBlue
class node_train,node_forward,node_backward,node_updates toneAmber
class node_plot,node_plots toneMint
class node_csvdata toneIndigo
```

## Components

### Data workflow

- [Script entry point](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`
- [Load and split](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`
- [Noise augmentation](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`
- [Pixel normalization](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`
- [Accuracy evaluation](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`

### Neural network

- [Gradient descent](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`
- [Forward propagation](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`
- [Backpropagation](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`
- [Parameter updates](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`

### Visual outputs

- [Sample plotting](https://github.com/robinramdin13/digit_recognizer/blob/main/main.py): `main.py`
- [Saved sample plots](https://github.com/robinramdin13/digit_recognizer/tree/main/plots): `plots`

### Other components

- **Project user**
- **MNIST CSV data**

## Connections

- Project user → Script entry point: runs
- Script entry point → Load and split: calls
- Load and split → MNIST CSV data: reads
- Load and split → Noise augmentation: passes training data
- Noise augmentation → Pixel normalization: returns augmented data
- Pixel normalization → Gradient descent: passes inputs
- Gradient descent → Forward propagation: calls
- Gradient descent → Backpropagation: calls
- Gradient descent → Parameter updates: calls
- Script entry point → Accuracy evaluation: evaluates
- Script entry point → Sample plotting: plots samples
- Sample plotting → Saved sample plots: saves
