GitHunt
AR

Arekflo2002/Project_Computational_Intelligence_Part2

This project implements a custom Artificial Neural Network (ANN) from scratch in Python to predict diabetes based on medical data.

๐Ÿง  Neural Network for Diabetes Prediction

This project implements a custom Artificial Neural Network (ANN) from scratch in Python to predict diabetes based on medical data.

๐Ÿ“Œ Features

โœ”๏ธ Custom implementation of a fully connected feedforward ANN
โœ”๏ธ Backpropagation algorithm for training
โœ”๏ธ Configurable hyperparameters (epochs, learning rate, activation functions, layers, etc.)
โœ”๏ธ Training and evaluation using the diabetes.csv dataset
โœ”๏ธ Visualization of learning curves and model predictions

๐Ÿ— Implementation Details

The neural network is implemented using NumPy, without external deep learning frameworks like TensorFlow or PyTorch.

๐Ÿ”น Model Architecture

  • Input Layer: 8 features from the dataset
  • Hidden Layers: Configurable number of layers and neurons
  • Activation Functions: Sigmoid, ReLU, Tanh (configurable)
  • Output Layer: Single neuron with Sigmoid activation (binary classification)

๐Ÿ”น Training Process

  1. Forward Propagation: Compute activations for each layer.
  2. Loss Calculation: Binary cross-entropy loss is used.
  3. Backward Propagation: Gradients are computed and weights are updated.
  4. Parameter Updates: Using gradient descent with a configurable learning rate.

๐Ÿ”น Configurable Hyperparameters

Modify parameters in config.py or directly in main.py:

EPOCHS = 10000
LEARNING_RATE = 0.01
LAYERS = [8, 3, 3, 1]  # Input, Hidden, Output
ACTIVATION_FUNCTION = 'sigmoid'  # Options: 'sigmoid', 'relu', 'tanh'

๐Ÿ“– References

Arekflo2002/Project_Computational_Intelligence_Part2 | GitHunt