Deep LearningCompleted

Binary Classification Neural Network (From Scratch)

Implemented a simple neural network from scratch to predict insurance purchase decisions based on customer demographics.

2024
1 day
1 person
Individual Project
Binary Classification Neural Network (From Scratch)

Context & Background

This project aimed to build a foundational understanding of neural networks by implementing a binary classifier from scratch without using deep learning frameworks. The dataset contained customer attributes such as age and affordability score, with the target variable indicating whether the customer purchased insurance.

Challenge

While libraries such as TensorFlow or PyTorch provide high-level abstractions, building a network manually was necessary to fully understand the underlying mechanics of forward propagation, gradient computation, and parameter updates.

Solution

I designed and implemented a custom neural network class in Python that takes two input features and predicts a binary output. The model uses a sigmoid activation function for probability estimation and optimizes its weights and bias through gradient descent while minimizing log-loss as the objective function. To prevent unnecessary training once convergence was reached, I implemented an early stopping mechanism triggered when the improvement in loss became negligible.

Results & Impact

83% accuracy on the test dataset
Strengthened understanding of neural network fundamentals

Appendix

Model Architecture

The model architecture is a simple feedforward neural network with two input features and one output node. The input layer has two neurons and the output layer has one neuron. The sigmoid activation function is used for the output layer.
Model Architecture

Technologies Used

PythonNumpyPandasScikit-learn

Project Details

Company

Personal Project

Duration

1 day

Team Size

1 person

My Role

Individual Project

Interested in Similar Work?

Let's discuss how I can help your team with data science and ML projects.

Get In Touch