Skip to content

About

This Python code implements a basic neural network for binary classification using backpropagation. The decision boundaries are visualized using matplotlib.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Neural Network for Binary Classification

#Overview This Python code implements a simple neural network for binary classification using backpropagation. The network is trained on two datasets (dataset1_training.txt and dataset2_training.txt) and tested on corresponding testing datasets. Visualization of decision boundaries is provided using matplotlib.

Contents

neural_network.py: Contains the main code implementing the neural network. dataset1_training.txt: Training data for dataset 1. dataset1_testing.txt: Testing data for dataset 1. dataset2_training.txt: Training data for dataset 2. dataset2_testing.txt: Testing data for dataset 2.

How to Use

Install required libraries:

bash Copy code pip install numpy matplotlib Run the neural_network.py script:

bash Copy code python neural_network.py View the console output for training progress, and accuracy on the testing datasets.

Decision boundaries will be visualized using matplotlib.

Parameters

n_inputs: Number of input features. n_outputs: Number of output classes. learning_rate: Learning rate for backpropagation. num_epochs: Number of training epochs. initialize_network: Function to initialize the neural network. train_network: Function to train the neural network. plot_decision_boundary: Function to visualize decision boundaries. calculate_accuracy: Function to calculate accuracy on a dataset. Feel free to modify parameters and datasets as needed for your specific use case.

Dependencies

NumPy: For numerical operations. Matplotlib: For data visualization.

Acknowledgments

The code is inspired by the book "Neural Networks from Scratch in Python" by Harrison Kinsley. Please note that this is a basic template, and you might want to customize it further based on your specific needs and additional details about the project.

About

This Python code implements a basic neural network for binary classification using backpropagation. The decision boundaries are visualized using matplotlib.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages