A simple Artificial Neural Network (ANN) Perceptron implementation with comprehensive visualizations for educational purposes.
This repository contains a straightforward implementation of a neural network perceptron using Keras, designed to demonstrate fundamental concepts of neural networks with visual aids. The example uses a simple 2D dataset to show how a basic neural network can be trained and evaluated, with detailed visualizations of the data, model architecture, training process, and performance metrics.
- 📊 Visualization of 2D input data with target classifications
- 🔄 Implementation of a simple neural network with one hidden layer
- 📈 Training process visualization (accuracy and loss over epochs)
- 📉 Comprehensive model evaluation with confusion matrix
- 🔍 Detailed display of network weights and biases
- 📋 Calculation and display of various performance metrics (precision, recall, etc.)
- Python 3.x
- TensorFlow/Keras
- pandas
- scikit-learn
- seaborn
- matplotlib
- Clone the repository:
git clone https://github.com/yourusername/ANNPerceptronVizExample.git
cd ANNPerceptronVizExample
- Install the required dependencies:
pip install tensorflow pandas scikit-learn seaborn matplotlib
- Run the example:
python ann_perceptron_viz.py
- Observe the visualizations:
- Initial data scatter plot
- Model architecture diagram (saved as
model.png
) - Training accuracy and loss graphs
- Confusion matrix heatmap
When you run the script, you'll see:
- A scatter plot of the input data showing the distribution of the two classes
- The model summary in the console
- A plot of the model accuracy over training epochs
- A plot of the model loss over training epochs
- Detailed network weights and biases
- A confusion matrix and various performance metrics including:
- True/False Positive/Negative counts
- Precision, Recall, Accuracy
- True Positive Rate, True Negative Rate
- And other classification metrics
This project is licensed under the MIT License - see the LICENSE file for details.
For more information on the concepts demonstrated in this example: