Skip to content

Custom neural network predicting heart attack likelihood. Trained on Kaggle dataset. Implements basic architecture with sigmoid activation. Evaluates model with loss plot, accuracy, and confusion matrix.

Notifications You must be signed in to change notification settings

AryanKarumuri/Neural-Network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Neural-Network

Description

This code implements a simple neural network from scratch using Python and NumPy. The neural network is trained on the Heart Attack Analysis & Prediction Dataset obtained from Kaggle. It follows a basic architecture with a single hidden layer and uses the sigmoid activation function. The training process includes forward and backward passes along with weight updates using stochastic gradient descent. Additionally, it evaluates the model's performance by plotting the loss curve and calculating the accuracy and confusion matrix on a test set.

Usage:

Setup:

Make sure you have Python installed on your system along with the required libraries specified in the packages section. Download the dataset heart.csv from the Kaggle link provided in the code.

Running the Script:

Ensure the dataset file heart.csv is in the same directory as the script. Execute the script in a Python environment.

Output:

The script will train the neural network on the dataset and output a loss curve plot. It will also calculate the accuracy of the model and display the confusion matrix.

Customization:

Hyperparameters such as learning rate (LR) and number of iterations (ITERATIONS) can be adjusted in the script to optimize performance.

Requirements:

  • Python 3.x
  • NumPy
  • Pandas
  • Seaborn
  • Scikit-learn

Dataset Credits:

Dataset Source: Dataset

About

Custom neural network predicting heart attack likelihood. Trained on Kaggle dataset. Implements basic architecture with sigmoid activation. Evaluates model with loss plot, accuracy, and confusion matrix.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages