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
- Forward Propagation: Compute activations for each layer.
- Loss Calculation: Binary cross-entropy loss is used.
- Backward Propagation: Gradients are computed and weights are updated.
- 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'