Skip to content

A three-layer neural network built completely from scratch using Python and NumPy to learn the XOR logic function. Demonstrates a mathematical understanding of forward propagation, backpropagation, and gradient descent without deep learning libraries.

Notifications You must be signed in to change notification settings

s4096770/ai-neural-network

Repository files navigation

Python Streamlit Jupyter Status

📘 Mathematical Explanation Notebook

View the full step-by-step neural network maths in: neural_network_math.ipynb

Or check out my website: https://s4096770-ai-neural-network-app-v9sprf.streamlit.app/


🧠 AI Neural Network Visualiser

This project builds a neural network from scratch to model the XOR problem, demonstrating how learning occurs through forward propagation, backpropagation, and gradient descent — all implemented from first principles in Python.

It includes both:

  • 📗 A Jupyter Notebook explaining the underlying mathematics step by step
  • ⚙️ A Streamlit App to interactively visualise the network’s learning process

🌐 Live Demo

🚀 Try it yourself: AI Neural Network App
📘 Read the maths explanation: neural_network_math.ipynb


🧩 Features

✅ Implements a 3-layer neural network (2-3-1)
✅ Uses the sigmoid activation and mean squared error loss
✅ Includes full mathematical derivations
✅ Visualises the training loss curve over epochs
✅ Built with Python, NumPy, Matplotlib, and Streamlit


💻 Tech Stack

Tool Purpose
Python 3.9+ Core implementation
NumPy Linear algebra + optimisation
Matplotlib Visualising learning progress
Streamlit Interactive web app
Jupyter Notebook Mathematical explanation

📂 File Overview

File Description
app.py Streamlit app for interactive visualisation
neural_network_math.ipynb Jupyter notebook with maths and theory
neural_network.py Core neural network logic
requirements.txt Dependencies for deployment

✨ About

Created as a hands-on demonstration of AI fundamentals and mathematical reasoning,
this project shows the full journey from equations ➜ implementation ➜ visualisation.


👩‍💻 Author: Maha Laeeq
🎓 Bachelor of Computer Science — RMIT University
📍 Melbourne, Australia

About

A three-layer neural network built completely from scratch using Python and NumPy to learn the XOR logic function. Demonstrates a mathematical understanding of forward propagation, backpropagation, and gradient descent without deep learning libraries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published