A frontend-first, interactive web application that lets you see + manipulate + understand machine learning systems dynamically. This is NOT a passive learning platform — it's an Interactive ML Systems Visualization Engine where you can train models live, visualize internal workings, and manipulate hyperparameters in real-time.
- 🎯 100% In-Browser ML - No backend required. All ML runs locally using TensorFlow.js
- 🎬 Real-Time Animation - Watch algorithms train step-by-step with smooth animations
- 🎮 Interactive Controls - Manipulate hyperparameters and see instant results
- 👤 Guest-First - No authentication required. Start learning immediately
| Module | Description | Status |
|---|---|---|
| Gradient Descent | 3D loss surface with animated descent path | ✅ Complete |
| Linear Regression | Interactive fit line with real-time updates | ✅ Complete |
| Neural Networks | Forward/backprop visualization with decision boundary | ✅ Complete |
| K-Means Clustering | Centroid convergence animation | ✅ Complete |
- Node.js 18+
- npm 10+
# Clone the repository
git clone https://github.com/yourusername/enjoy-ml-ai-maths.git
cd enjoy-ml-ai-maths
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:3000 to see the application.
enjoy-ml-ai-maths/
├── apps/
│ └── web/ # Next.js frontend application
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ │ ├── ui/ # Shared UI components
│ │ └── viz/ # Visualization components
│ ├── lib/ # Utilities and store
│ └── package.json
│
├── packages/
│ ├── ml-core/ # ML algorithms (TF.js)
│ ├── animation-engine/ # Timeline-based animation
│ ├── simulation-engine/ # Simulation pipeline
│ ├── visualization/ # Rendering layer
│ └── ui/ # Design system
│
├── package.json # Root (workspace)
├── turbo.json # Turborepo config
└── README.md
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Next.js 14 (App Router) | Full-stack React framework |
| Language | TypeScript | Type safety |
| ML Engine | TensorFlow.js | In-browser ML |
| 3D Graphics | Three.js + React Three Fiber | 3D visualizations |
| 2D Charts | D3.js | Custom data viz |
| State | Zustand | Lightweight state management |
| Styling | Tailwind CSS | UI components |
| Animation | Custom Engine + Framer Motion | Simulation animations |
| Testing | Vitest + Playwright | Unit + E2E tests |
| Deployment | Vercel | Edge hosting |
- Navigate to Gradient Descent module
- Adjust learning rate and epochs using sliders
- Choose a loss function (Quadratic, Rosenbrock, or Beale)
- Click Play to watch the optimization
- Use animation controls to step through frames
- Navigate to Linear Regression module
- Adjust hyperparameters (learning rate, epochs, noise)
- Click Regenerate Data for new data points
- Watch the fit line converge in real-time
- View R² and MSE metrics
- Navigate to Neural Networks module
- Choose dataset type (Blobs, Moons, Circles)
- Adjust hidden units and learning rate
- Watch the decision boundary form
- View network architecture visualization
- Navigate to K-Means module
- Set number of clusters (K)
- Adjust points per cluster
- Watch centroids converge
- View inertia metrics
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests for specific package
cd packages/ml-core && npm test# Install Vercel CLI
npm install -g vercel
# Deploy
vercelOr connect your GitHub repository to Vercel for automatic deployments.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- TensorFlow.js - In-browser machine learning
- Three.js - 3D graphics library
- React Three Fiber - React renderer for Three.js
- D3.js - Data visualization library
- Next.js - React framework
- Vercel - Deployment platform
For questions or feedback, please open an issue on GitHub.
Built with ❤️ for ML education