Skip to content

parsa-faraji/neural-network-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Header

An interactive web-based visualization tool for understanding how neural networks learn. Watch decision boundaries form in real-time as you train networks on various datasets.

Live Demo ML JavaScript License: MIT


Features

  • Interactive Training: Start/stop training and watch the network learn in real-time
  • Multiple Datasets: Circle, XOR, Spiral, and Gaussian classification problems
  • Customizable Architecture: Adjust hidden layers (1-6) and neurons per layer (1-8)
  • Activation Functions: Choose between ReLU, Tanh, and Sigmoid
  • Learning Rate Control: Fine-tune training speed from 0.001 to 0.3
  • Live Visualizations:
    • Decision boundary heatmap
    • Network architecture with weight visualization
    • Training loss chart

Demo

Try the Live Demo - No installation needed!

How It Works

The playground implements a feedforward neural network from scratch using vanilla JavaScript:

  • Forward Propagation: Computes activations layer by layer
  • Backpropagation: Calculates gradients using the chain rule
  • Gradient Descent: Updates weights to minimize binary cross-entropy loss
  • Xavier Initialization: Smart weight initialization for stable training

Usage

  1. Select a dataset (Circle is easiest, Spiral is hardest)
  2. Configure the network architecture
  3. Click "Train" to start training
  4. Watch the decision boundary evolve
  5. Experiment with different settings!

Technologies

  • Pure JavaScript (no ML libraries)
  • HTML5 Canvas for visualizations
  • CSS3 with modern design

Author

Built by Parsa Faraji Alamouti

License

MIT License

About

Interactive visualization of neural networks learning in real-time. Watch decision boundaries form as you train on various datasets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors