NeuroPredict
NeuroPredict trains a real neural network, written from scratch in Python and NumPy, on the classic XOR problem. You can watch its weights change, follow its loss going down, and test its predictions – all from your browser.
What is a neural network?
A neural network is a computer model inspired by the brain. It is made of small units called neurons arranged in layers. Each connection has a weight that says how important it is. The network learns by looking at examples, measuring how wrong it is (the loss), and slowly adjusting its weights to become less wrong. This adjusting process is called training.
Key features
Real neural network
A 2-input, 1-hidden-layer, 1-output network coded from scratch with NumPy – no ML libraries.
Interactive visualizer
See every neuron and weight. Run a forward pass and watch data flow through the layers.
Training simulator
Choose epochs, learning rate and hidden neurons. Start, stop and reset training anytime.
Live predictions
Enter two binary inputs and get the model's real output probability and confidence.
Real training graphs
Loss and accuracy charts drawn from the values the Python backend actually records.
Learning centre
15 short lessons on AI, ML and neural networks in simple English with examples.
How the system works
Choose settings
Pick epochs, learning rate and hidden neurons in the simulator.
Flask receives
The browser sends the settings to the Flask backend as JSON.
NumPy trains
Forward pass → loss → backpropagation → gradient descent, repeated every epoch.
See results
The website reads real loss, accuracy and weights and updates the charts and diagram.
Dashboard
Current state of the neural network. Every value below comes from the Python backend.
Model predictions on the XOR dataset
| Input 1 | Input 2 | Expected | Model output (probability) | Predicted | Result |
|---|
Dataset information
XOR is not linearly separable, so a single straight line cannot separate the classes. A hidden layer solves this.
Neural Network Visualizer
The diagram is drawn from the model's real weights. Blue lines are positive weights, pink lines are negative, and thicker lines mean bigger weights. Pick an input to run a forward pass.
XOR network
untrainedRun a forward pass
Choose an XOR input:
Activation function: Sigmoid
σ(z) = 1 / (1 + e−z)
Sigmoid turns any number into a value between 0 and 1. Large positive inputs give values near 1, large negative inputs give values near 0. That is why the output can be read as a probability.
Current weights and biases
Training Simulator
Training runs in the Python backend. The website only sends your settings and displays the real progress.
Settings
Changing hidden neurons creates a new network. Starting again without reset continues training from the current weights.
Live training
untrainedTraining log
Prediction Module
Enter two binary values. They are sent to Flask, passed through the trained network, and the real output is shown.
Inputs
Result
Output ≥ 0.5 → predict 1, otherwise 0. Confidence = output if predicting 1, or (1 − output) if predicting 0.
All four XOR inputs
| Input 1 | Input 2 | Expected | Model output | Predicted | Result |
|---|
Training Graphs
These graphs are drawn only from values recorded by the backend during training. Before training they are empty.
Loss vs Epochs
Accuracy vs Epochs
Training progress
0 / 0 epochs
Summary of the last run
Learning Centre
Fifteen short lessons, in order. Click a topic to open it.
About NeuroPredict
Project title
NeuroPredict – An Interactive Neural Network Simulator
Project objective
To build a website that shows, step by step and with real computation, how an artificial neural network learns the XOR function using forward propagation, backpropagation and gradient descent.
Problem statement
Neural networks are usually taught with formulas and static diagrams, so beginners find it hard to "see" how weights change and how a network actually learns. Ready-made libraries also hide the internal steps.
Proposed solution
A from-scratch NumPy neural network served by Flask, with a web interface that trains it live, draws its weights, plots real loss and accuracy, makes predictions and explains each concept in simple language.
Technologies used
Project scope
Educational demonstration of a small feed-forward network (2 inputs, 2–8 hidden neurons, 1 output) on the 4-sample XOR dataset. Runs locally on a laptop; no cloud services or paid APIs. Not intended for large real-world datasets.
Team details
| Institute | Unitedworld Institute of Technology (UIT), Karnavati University |
| Programme / Semester | B.Tech CSE (Cyber Security) – Semester I |
| Subject | Fundamentals of Artificial Intelligence (FAI) – 26UTU01003 |
| Group number | 14 |
| Class / Section | 1-CYBER-A |
| Team members | Kasak Nikhil Shah – 2000012734 Heer Vishal Khatri – 2000014761 Harshil Samir Shah – 2000016272 |
| Faculty guides | Khyati Karia and Bhaumik Patel |
| Academic year | 2026–27 |