Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Binary Classification Neural Network (PyTorch)

This repository contains a feedforward neural network implemented using PyTorch for binary classification tasks. It is designed to take numerical feature inputs, pass them through a hidden layer with ReLU activation, and output a binary prediction using a sigmoid function.

🧠 Model Architecture

Input Layer (input_size)
     ↓
Linear Layer (input_size β†’ hidden_size)
     ↓
ReLU Activation
     ↓
Linear Layer (hidden_size β†’ output_size)
     ↓
Sigmoid Activation
     ↓
Output (Binary Prediction)

πŸ“¦ Dependencies

Ensure you have the following Python packages installed:

pip install torch numpy

βœ… Evaluation

After training, the model is evaluated on both the training and test datasets using a threshold of 0.5 to round sigmoid outputs to binary predictions.

predicted = outputs.round()
correct = (predicted == y_true.view(-1, 1)).float().sum()
accuracy = correct / y_true.size(0)

πŸ“ˆ Accuracy

Accuracy on training data: 97.80%
Accuracy on test data: 94.74%

πŸ“„ License

This project is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages