# t-thirupathi/neural-network-implementation architecture

> Architecture diagram of the GitHub repository t-thirupathi/neural-network-implementation, 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/t-thirupathi/neural-network-implementation
- Repository: https://github.com/t-thirupathi/neural-network-implementation

## Overview

This is a from-scratch, small neural-network experiment: running the script creates and normalizes sample data, splits it, trains a model, and plots training and prediction results. The model uses activation functions, backpropagation, an optimizer, and a stopping criterion. The README also describes experimenting with alternative activations and optimizers. The graph reflects the shown script; these modules are tightly coupled in one runtime rather than separate services.

Main entry points: [`neural_network.py`](https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.py) (Neural solver), [`activation.py`](https://github.com/t-thirupathi/neural-network-implementation/blob/main/activation.py) (Activations), [`optimizer.py`](https://github.com/t-thirupathi/neural-network-implementation/blob/main/optimizer.py) (Optimizers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Data and results"]
  node_data["Prepare data<br/>[neural_network.py]"]
  node_results["Evaluate and plot<br/>[neural_network.py]"]
end

subgraph group_model["Model training"]
  node_solver["Neural solver<br/>[neural_network.py]"]
  node_termination["Stop criteria<br/>[neural_network.py]"]
end

subgraph group_methods["Training methods"]
  node_activation["Activations<br/>[activation.py]"]
  node_optimizer["Optimizers<br/>[optimizer.py]"]
end

node_user(("Experimenter"))

node_user -->|"runs script"| node_data
node_data -->|"trains model"| node_solver
node_solver -->|"uses forward/backward"| node_activation
node_solver -->|"requests updates"| node_optimizer
node_solver -->|"checks stopping"| node_termination
node_data -->|"supplies evaluation data"| node_results
node_solver -->|"returns loss history"| node_results

click node_data "https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.py"
click node_solver "https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.py"
click node_activation "https://github.com/t-thirupathi/neural-network-implementation/blob/main/activation.py"
click node_optimizer "https://github.com/t-thirupathi/neural-network-implementation/blob/main/optimizer.py"
click node_termination "https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.py"
click node_results "https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.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_data,node_results toneBlue
class node_solver,node_termination toneAmber
class node_activation,node_optimizer toneMint
class node_user toneIndigo
```

## Components

### Data and results

- [Prepare data](https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.py): `neural_network.py`
- [Evaluate and plot](https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.py): `neural_network.py`

### Model training

- [Neural solver](https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.py): `neural_network.py`
- [Stop criteria](https://github.com/t-thirupathi/neural-network-implementation/blob/main/neural_network.py): `neural_network.py`

### Training methods

- [Activations](https://github.com/t-thirupathi/neural-network-implementation/blob/main/activation.py): `activation.py`
- [Optimizers](https://github.com/t-thirupathi/neural-network-implementation/blob/main/optimizer.py): `optimizer.py`

### Other components

- **Experimenter**

## Connections

- Experimenter → Prepare data: runs script (evidence: `README`)
- Prepare data → Neural solver: trains model (evidence: `neural_network.py`)
- Neural solver → Activations: uses forward/backward (evidence: `neural_network.py`)
- Neural solver → Optimizers: requests updates (evidence: `neural_network.py`)
- Neural solver → Stop criteria: checks stopping (evidence: `neural_network.py`)
- Prepare data → Evaluate and plot: supplies evaluation data (evidence: `neural_network.py`)
- Neural solver → Evaluate and plot: returns loss history (evidence: `neural_network.py`)
