This repository contains a basic implementation of a neural network for binary classification using TensorFlow and Keras.
This project demonstrates how to build, train and evaluate a simple neural network model with TensorFlow. It includes code to:
- Generate synthetic data for a binary classification problem
- Create a neural network with one hidden layer
- Train the model
- Evaluate its performance
- Visualize the decision boundary and training metrics
The neural network architecture is deliberately kept simple to serve as an introduction to deep learning concepts.
The code requires the following Python packages:
- numpy
- tensorflow
- scikit-learn
- matplotlib
You can install these dependencies using:
pip install -r requirements.txt
Simply run the Python script:
python simple_neural_network.py
This will:
- Generate the sample data
- Build and train the model
- Display the model's performance
- Create visualizations of the decision boundary and training history
The neural network has the following structure:
- Input layer with 2 features
- Hidden layer with 10 neurons and ReLU activation
- Output layer with 1 neuron and sigmoid activation
The script will print the model summary and test accuracy, and display two visualizations:
- A plot showing the decision boundary of the trained model
- Training and validation metrics over time (loss and accuracy)
[Add your preferred license here]
[Add your contact information here]