An open API service indexing awesome lists of open source software.

https://github.com/chanmeng666/advanced-neural-network-applications

Practical implementations of perceptron and linear neuron models for classification and regression, with mathematical analysis and visualizations in Jupyter notebooks.
https://github.com/chanmeng666/advanced-neural-network-applications

classification data-analysis data-science educational gradient-descent jupyter-notebook linear-neuron machine-learning matplotlib neural-network neural-networks numpy perceptron python regression

Last synced: 3 months ago
JSON representation

Practical implementations of perceptron and linear neuron models for classification and regression, with mathematical analysis and visualizations in Jupyter notebooks.

Awesome Lists containing this project

README

          


# ๐Ÿง  Advanced Neural Network Applications

Perceptron & Linear Neuron Models from Scratch

Practical implementations of perceptron and linear neuron models for classification and regression tasks,

featuring step-by-step mathematical analysis and interactive visualizations in Jupyter notebooks.

Run everything in your browser with **Binder** or **Google Colab** โ€” no installation required.

[![][github-stars-shield]][github-stars-link]
[![][github-forks-shield]][github-forks-link]
[![][github-issues-shield]][github-issues-link]
[![][github-license-shield]][github-license-link]
[![][github-contributors-shield]][github-contributors-link]
[![][github-releasedate-shield]][github-releasedate-link]

**Tech Stack:**








Star this repo

ย 

Sponsor Me

**Share This Project**

[![][share-x-shield]][share-x-link]
[![][share-telegram-shield]][share-telegram-link]
[![][share-whatsapp-shield]][share-whatsapp-link]
[![][share-reddit-shield]][share-reddit-link]
[![][share-weibo-shield]][share-weibo-link]
[![][share-mastodon-shield]][share-mastodon-link]
[![][share-linkedin-shield]][share-linkedin-link]

Building intuition for neural networks through hands-on implementations and mathematical analysis.

> [!IMPORTANT]
> This project demonstrates foundational neural network architectures through hands-on implementations. It covers **perceptron** models for binary classification and **linear neuron** models for regression, with detailed mathematical derivations, step-by-step weight update calculations, and comprehensive visualizations.

๐Ÿ“‘ Table of Contents

#### TOC

- [๐ŸŒŸ Introduction](#-introduction)
- [โœจ Key Features](#-key-features)
- [`1` Perceptron Classification](#1-perceptron-classification)
- [`2` Linear Neuron Regression](#2-linear-neuron-regression)
- [`*` Additional Features](#-additional-features)
- [๐Ÿ“Š Visualizations](#-visualizations)
- [๐Ÿ› ๏ธ Tech Stack](#๏ธ-tech-stack)
- [๐Ÿš€ Try It Online](#-try-it-online)
- [๐Ÿ“š Notebooks](#-notebooks)
- [๐Ÿ“ Datasets](#-datasets)
- [๐Ÿ’ป Getting Started](#-getting-started)
- [๐Ÿ“‚ Project Structure](#-project-structure)
- [๐Ÿค Contributing](#-contributing)
- [โค๏ธ Sponsor](#๏ธ-sponsor)
- [๐Ÿ“„ License](#-license)
- [๐Ÿ™‹โ€โ™€๏ธ Author](#๏ธ-author)

####


## ๐ŸŒŸ Introduction

About This Project

This repository provides a comprehensive, hands-on introduction to foundational neural network architectures. Through carefully structured Jupyter notebooks, you'll build perceptron and linear neuron models from scratch, understanding every mathematical step along the way.

Whether you're a student learning machine learning for the first time or an educator looking for teaching materials, these notebooks offer clear explanations, reproducible code, and rich visualizations that bring the theory to life.

What You'll Learn

- How perceptrons classify data using step activation functions and iterative weight updates
- How linear neurons perform regression using gradient descent optimization
- The mathematics behind convergence, learning rates, and decision boundaries
- How to visualize model behavior in 2D and 3D

> [!NOTE]
> - Python 3.x required
> - No GPU needed โ€” all models run on CPU
> - Zero-install option available via Binder and Google Colab

> [!TIP]
> **โญ Star us** to receive all release notifications from GitHub without delay!

โญ Star History



[![][back-to-top]](#readme-top)

## โœจ Key Features

### `1` Perceptron Classification

Binary classification of fish species (Canadian vs. Alaskan) using step activation functions and iterative weight updates. Includes convergence proofs and classification boundary visualization.


Perceptron Classification Boundaries

Perceptron classification boundaries for fish species identification


Key capabilities include:
- ๐ŸŸ **Fish Species Classification**: Distinguish Canadian from Alaskan fish using ring diameter measurements
- ๐Ÿ“ **Mathematical Derivations**: Step-by-step weight update calculations with full working
- ๐Ÿ“ˆ **Convergence Analysis**: Proof of convergence and boundary evolution visualization
- ๐ŸŽฏ **Decision Boundaries**: Interactive plotting of classification boundaries

[![][back-to-top]](#readme-top)

### `2` Linear Neuron Regression

Regression for predicting building heat influx from elevation measurements, using gradient descent optimization. Progresses from single-input to multi-input models with 3D visualization.


3D Predicted Heat Influx

3D surface plot of predicted heat influx with actual data points


Key capabilities include:
- ๐Ÿ—๏ธ **Heat Influx Prediction**: Predict building heat influx from north and south elevation data
- ๐Ÿ“‰ **Gradient Descent**: Learning rate tuning and convergence analysis
- ๐Ÿ”„ **Single & Multi-Input**: Progressive complexity from 1D to 2D feature spaces
- ๐ŸŒ **3D Visualization**: Interactive prediction surface rendering

[![][back-to-top]](#readme-top)

### `*` Additional Features

Beyond the core models, this project includes:

- [x] ๐Ÿ“ **Detailed Math**: Complete mathematical derivations for every weight update step
- [x] ๐ŸŽ“ **Structured Learning Path**: 7 notebooks in recommended sequential order
- [x] โ˜๏ธ **Zero Installation**: Run everything in Binder or Google Colab
- [x] ๐Ÿ“Š **Rich Visualizations**: 2D plots, 3D surfaces, and comparison charts
- [x] โœ… **Model Validation**: Testing procedures and accuracy evaluation
- [x] ๐Ÿ”ง **Optimization Analysis**: Learning rate tuning and convergence studies
- [x] ๐Ÿ“‚ **Clean Datasets**: Well-documented CSV files ready for exploration

> โœจ An ideal resource for learning the foundations of neural networks.

[![][back-to-top]](#readme-top)

## ๐Ÿ“Š Visualizations





Perceptron Classification Boundaries

Perceptron Classification Boundaries


3D Predicted Heat Influx

3D Predicted Heat Influx Surface



๐Ÿ“ˆ More Visualizations





Actual vs Predicted Heat Influx

Actual vs Predicted Heat Influx


Actual vs Predicted Heat Influx 2

Detailed Comparison Analysis




Optimized Linear Model Fit

Optimized Linear Model Fit


Optimized Linear Model Fit 2

Enhanced Optimization Results



[![][back-to-top]](#readme-top)

## ๐Ÿ› ๏ธ Tech Stack





Python

Python 3.x


Jupyter

Jupyter


NumPy

NumPy


Pandas

Pandas


Matplotlib

Matplotlib


Scikit-learn

Scikit-learn



- **Python** โ€” implementation language
- **Jupyter Notebook** โ€” interactive development environment
- **NumPy** โ€” numerical computing and matrix operations
- **Pandas** โ€” data loading and manipulation
- **Matplotlib** โ€” plotting and visualization
- **Scikit-learn** โ€” evaluation metrics and utilities

[![][back-to-top]](#readme-top)

## ๐Ÿš€ Try It Online

You can run all notebooks directly in your browser โ€” no local installation required:

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ChanMeng666/advanced-neural-network-applications/main?labpath=notebooks)
ย ย 
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChanMeng666/advanced-neural-network-applications/blob/main/notebooks/01-perceptron-basics.ipynb)

- **Binder** โ€” launch the full interactive environment with all notebooks
- **Google Colab** โ€” open individual notebooks via the links in the [Notebooks](#-notebooks) table below


Binder screenshot โ€” running notebooks in the browser

Running notebooks interactively on Binder


[![][back-to-top]](#readme-top)

## ๐Ÿ“š Notebooks

| # | Notebook | Topic | Description | Colab |
|---|----------|-------|-------------|-------|
| 1 | [01-perceptron-basics](notebooks/01-perceptron-basics.ipynb) | Perceptron | Binary classification with fish species data, weight initialization, activation functions | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChanMeng666/advanced-neural-network-applications/blob/main/notebooks/01-perceptron-basics.ipynb) |
| 2 | [02-perceptron-analysis](notebooks/02-perceptron-analysis.ipynb) | Perceptron | Mathematical analysis, convergence proofs, classification boundary visualization | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChanMeng666/advanced-neural-network-applications/blob/main/notebooks/02-perceptron-analysis.ipynb) |
| 3 | [03-linear-neuron-single-input](notebooks/03-linear-neuron-single-input.ipynb) | Linear Neuron | Single-input regression predicting heat influx from north elevation | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChanMeng666/advanced-neural-network-applications/blob/main/notebooks/03-linear-neuron-single-input.ipynb) |
| 4 | [04-linear-neuron-optimization](notebooks/04-linear-neuron-optimization.ipynb) | Optimization | Learning rate tuning, gradient descent, convergence analysis | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChanMeng666/advanced-neural-network-applications/blob/main/notebooks/04-linear-neuron-optimization.ipynb) |
| 5 | [05-linear-neuron-multi-input](notebooks/05-linear-neuron-multi-input.ipynb) | Linear Neuron | Multi-input regression using north and south elevation measurements | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChanMeng666/advanced-neural-network-applications/blob/main/notebooks/05-linear-neuron-multi-input.ipynb) |
| 6 | [06-linear-neuron-validation](notebooks/06-linear-neuron-validation.ipynb) | Validation | Model validation and testing procedures | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChanMeng666/advanced-neural-network-applications/blob/main/notebooks/06-linear-neuron-validation.ipynb) |
| 7 | [07-linear-neuron-3d-visualization](notebooks/07-linear-neuron-3d-visualization.ipynb) | Visualization | Interactive 3D prediction surface rendering | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChanMeng666/advanced-neural-network-applications/blob/main/notebooks/07-linear-neuron-3d-visualization.ipynb) |

**Recommended learning path:** Start with notebook 01, then progress sequentially through the series.

[![][back-to-top]](#readme-top)

## ๐Ÿ“ Datasets

### Fish Classification (`data/fish_data.csv`)

Binary classification dataset with 94 fish measurements:
- **Features:** freshwater ring diameter, saltwater ring diameter
- **Target:** species label (0 = Canadian, 1 = Alaskan)

### Heat Influx (`data/heat_influx_north_south.csv`)

Regression dataset with 29 building observations:
- **Features:** north and south elevation measurements
- **Target:** heat influx (continuous)

[![][back-to-top]](#readme-top)

## ๐Ÿ’ป Getting Started

> [!TIP]
> Prefer not to install anything? Use [Binder](https://mybinder.org/v2/gh/ChanMeng666/advanced-neural-network-applications/main?labpath=notebooks) or [Google Colab](#-notebooks) to run notebooks directly in your browser.

### Prerequisites

- Python 3.x ([Download](https://python.org))
- pip (Python package manager)
- Git ([Download](https://git-scm.com))

### Installation

```bash
git clone https://github.com/ChanMeng666/advanced-neural-network-applications.git
cd advanced-neural-network-applications
pip install -r requirements.txt
```

### Running the Notebooks

```bash
jupyter notebook
# or
jupyter lab
```

Then open any notebook from the `notebooks/` directory. Notebooks load data using relative paths, so they work out of the box when launched from the project root.

[![][back-to-top]](#readme-top)

## ๐Ÿ“‚ Project Structure

```
advanced-neural-network-applications/
โ”œโ”€โ”€ .github/
โ”‚ โ”œโ”€โ”€ FUNDING.yml
โ”‚ โ”œโ”€โ”€ ISSUE_TEMPLATE/
โ”‚ โ”‚ โ”œโ”€โ”€ bug_report.md
โ”‚ โ”‚ โ””โ”€โ”€ feature_request.md
โ”‚ โ””โ”€โ”€ workflows/
โ”‚ โ””โ”€โ”€ update-license-year.yml
โ”œโ”€โ”€ data/
โ”‚ โ”œโ”€โ”€ fish_data.csv
โ”‚ โ””โ”€โ”€ heat_influx_north_south.csv
โ”œโ”€โ”€ images/
โ”‚ โ””โ”€โ”€ (visualization outputs)
โ”œโ”€โ”€ notebooks/
โ”‚ โ”œโ”€โ”€ 01-perceptron-basics.ipynb
โ”‚ โ”œโ”€โ”€ 02-perceptron-analysis.ipynb
โ”‚ โ”œโ”€โ”€ 03-linear-neuron-single-input.ipynb
โ”‚ โ”œโ”€โ”€ 04-linear-neuron-optimization.ipynb
โ”‚ โ”œโ”€โ”€ 05-linear-neuron-multi-input.ipynb
โ”‚ โ”œโ”€โ”€ 06-linear-neuron-validation.ipynb
โ”‚ โ””โ”€โ”€ 07-linear-neuron-3d-visualization.ipynb
โ”œโ”€โ”€ CHANGELOG.md
โ”œโ”€โ”€ CITATION.cff
โ”œโ”€โ”€ CODE_OF_CONDUCT.md
โ”œโ”€โ”€ CONTRIBUTING.md
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ PULL_REQUEST_TEMPLATE.md
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ SECURITY.md
โ”œโ”€โ”€ SUPPORT.md
โ””โ”€โ”€ requirements.txt
```

[![][back-to-top]](#readme-top)

## ๐Ÿค Contributing

Contributions are welcome! Here's how you can help improve this project:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/your-feature`)
3. Commit your changes
4. Push to the branch and open a pull request

Please read our [Contributing Guidelines](CONTRIBUTING.md) for detailed instructions and follow our [Code of Conduct](CODE_OF_CONDUCT.md). For security concerns, see [SECURITY.md](SECURITY.md). For help, see [SUPPORT.md](SUPPORT.md).

[![][pr-welcome-shield]][pr-welcome-link]

### Contributors



[![][back-to-top]](#readme-top)

## โค๏ธ Sponsor

If this project helped you learn, consider supporting its development!



Star on GitHub

ย ย 

Buy Me A Coffee



Buy Me A Coffee

### Thanks to all the kind people! ๐Ÿ’–

**Stargazers**



Stargazers repo roster for @ChanMeng666/advanced-neural-network-applications

**Forkers**



Forkers repo roster for @ChanMeng666/advanced-neural-network-applications

[![][back-to-top]](#readme-top)

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™‹โ€โ™€๏ธ Author

**Chan Meng**



LinkedIn


GitHub


Email


Website

---


๐Ÿง  Building Intuition for Neural Networks ๐ŸŒŸ


Learn the fundamentals through hands-on implementations


โญ **Star us on GitHub** ยท ๐Ÿ“– **Read the Notebooks** ยท ๐Ÿ› **Report Issues** ยท ๐Ÿ’ก **Request Features** ยท ๐Ÿค **Contribute**


GitHub stars
GitHub forks
GitHub watchers

---

[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square

[github-stars-link]: https://github.com/ChanMeng666/advanced-neural-network-applications/stargazers
[github-forks-link]: https://github.com/ChanMeng666/advanced-neural-network-applications/forks
[github-issues-link]: https://github.com/ChanMeng666/advanced-neural-network-applications/issues
[github-license-link]: https://github.com/ChanMeng666/advanced-neural-network-applications/blob/main/LICENSE
[github-contributors-link]: https://github.com/ChanMeng666/advanced-neural-network-applications/contributors
[github-releasedate-link]: https://github.com/ChanMeng666/advanced-neural-network-applications
[pr-welcome-link]: https://github.com/ChanMeng666/advanced-neural-network-applications/pulls

[github-stars-shield]: https://img.shields.io/github/stars/ChanMeng666/advanced-neural-network-applications?color=ffcb47&labelColor=black&style=flat-square
[github-forks-shield]: https://img.shields.io/github/forks/ChanMeng666/advanced-neural-network-applications?color=8ae8ff&labelColor=black&style=flat-square
[github-issues-shield]: https://img.shields.io/github/issues/ChanMeng666/advanced-neural-network-applications?color=ff80eb&labelColor=black&style=flat-square
[github-license-shield]: https://img.shields.io/badge/license-MIT-white?labelColor=black&style=flat-square
[github-contributors-shield]: https://img.shields.io/github/contributors/ChanMeng666/advanced-neural-network-applications?color=c4f042&labelColor=black&style=flat-square
[github-releasedate-shield]: https://img.shields.io/github/last-commit/ChanMeng666/advanced-neural-network-applications?labelColor=black&style=flat-square
[pr-welcome-shield]: https://img.shields.io/badge/๐Ÿค_PRs_welcome-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge

[share-x-link]: https://x.com/intent/tweet?hashtags=machinelearning%2Cneuralnetworks&text=Check%20out%20Advanced%20Neural%20Network%20Applications%20-%20Learn%20perceptron%20%26%20linear%20neuron%20models%20from%20scratch!&url=https%3A%2F%2Fgithub.com%2FChanMeng666%2Fadvanced-neural-network-applications
[share-telegram-link]: https://t.me/share/url?text=Learn%20neural%20networks%20from%20scratch%20with%20hands-on%20Jupyter%20notebooks&url=https%3A%2F%2Fgithub.com%2FChanMeng666%2Fadvanced-neural-network-applications
[share-whatsapp-link]: https://api.whatsapp.com/send?text=Check%20out%20this%20neural%20network%20learning%20project%20https%3A%2F%2Fgithub.com%2FChanMeng666%2Fadvanced-neural-network-applications
[share-reddit-link]: https://www.reddit.com/submit?title=Advanced%20Neural%20Network%20Applications%20-%20Learn%20Perceptron%20%26%20Linear%20Neuron%20from%20Scratch&url=https%3A%2F%2Fgithub.com%2FChanMeng666%2Fadvanced-neural-network-applications
[share-weibo-link]: http://service.weibo.com/share/share.php?title=Advanced%20Neural%20Network%20Applications&url=https%3A%2F%2Fgithub.com%2FChanMeng666%2Fadvanced-neural-network-applications
[share-mastodon-link]: https://mastodon.social/share?text=Learn%20neural%20networks%20from%20scratch%20https://github.com/ChanMeng666/advanced-neural-network-applications
[share-linkedin-link]: https://linkedin.com/sharing/share-offsite/?url=https://github.com/ChanMeng666/advanced-neural-network-applications

[share-x-shield]: https://img.shields.io/badge/-share%20on%20x-black?labelColor=black&logo=x&logoColor=white&style=flat-square
[share-telegram-shield]: https://img.shields.io/badge/-share%20on%20telegram-black?labelColor=black&logo=telegram&logoColor=white&style=flat-square
[share-whatsapp-shield]: https://img.shields.io/badge/-share%20on%20whatsapp-black?labelColor=black&logo=whatsapp&logoColor=white&style=flat-square
[share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square
[share-weibo-shield]: https://img.shields.io/badge/-share%20on%20weibo-black?labelColor=black&logo=sinaweibo&logoColor=white&style=flat-square
[share-mastodon-shield]: https://img.shields.io/badge/-share%20on%20mastodon-black?labelColor=black&logo=mastodon&logoColor=white&style=flat-square
[share-linkedin-shield]: https://img.shields.io/badge/-share%20on%20linkedin-black?labelColor=black&logo=linkedin&logoColor=white&style=flat-square