Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ANN Training Program using PyTorch #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

leonking1990
Copy link

Description:

This PR introduces the initial implementation of the Artificial Neural Network (ANN) training program for diabetes detection using PyTorch. It includes the following features:

  • ✅ AnnModel.py – Defines the ANN model with ReLU activations and a Sigmoid output for binary classification.
  • ✅ DataBuilder.py – Handles dataset loading, preprocessing (normalization), and DataLoader setup.
  • ✅ Integration with KaggleHub – Downloads the diabetes dataset dynamically, allowing customization of the download path.
  • ✅ Training & Evaluation – Implements training with binary cross-entropy loss and Adam optimizer, along with model evaluation.

Changes Made:

  1. Implemented DiabetesModel – A fully connected feedforward neural network.
  2. Created DataBuilder – Automates data processing and loading.
  3. Ensured compatibility with CUDA – Uses GPU if available.
  4. Improved training script – Includes proper dataset splitting (80/20) and logging of loss per epoch.

How to Test:

  1. Clone the repository and switch to the correct branch:
    git checkout AnnTraining
  2. Install dependencies:
    pip install torch pandas scikit-learn kagglehub
  3. Run the training script:
    python AnnModel.py
  4. Confirm that the model trains successfully and outputs loss per epoch.

To-Do (Future Improvements):

  • Add hyperparameter tuning for learning rate and batch size.
  • Implement early stopping to prevent overfitting.
  • Save and load trained models for inference.

Reviewers:

  • Please verify that the dataset downloads and loads correctly.
  • Check if the training process runs without errors.
  • Suggestions for improving model performance are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants