Diabetes Prediction Using Artificial Neural Network (ANN)

Diabetes Prediction Using Artificial Neural Network (ANN)

Problem Statement

Develop an Artificial Neural Network (ANN) model to predict whether a patient is diabetic or non-diabetic using the Pima Indians Diabetes Dataset. The model should be trained using patient health parameters and evaluated using appropriate performance metrics.


Dataset Description

Dataset Name: Pima Indians Diabetes Dataset

The Pima Indians Diabetes Dataset is a medical dataset used for binary classification. It contains diagnostic measurements collected from female patients of Pima Indian heritage aged 21 years or older. The objective is to predict whether a patient has diabetes based on various medical attributes.

Number of Records

  • 768 patient records

Number of Features

  • 8 input features
  • 1 target variable

Target Variable

  • Outcome
    • 0 → Non-Diabetic
    • 1 → Diabetic

Dataset Attributes

AttributeDescription
PregnanciesNumber of pregnancies
GlucosePlasma glucose concentration
BloodPressureDiastolic blood pressure (mm Hg)
SkinThicknessTriceps skin fold thickness (mm)
InsulinTwo-hour serum insulin (mu U/ml)
BMIBody Mass Index
DiabetesPedigreeFunctionDiabetes pedigree function (family history score)
AgeAge of the patient (years)
OutcomeDiabetes status (0 = No, 1 = Yes)

 Pima Indian Diabetics Dataset  

Steps to Follow (Assignment)

  1. Import the required Python libraries.
  2. Load the Pima Indians Diabetes Dataset.
  3. Assign appropriate column names to the dataset.
  4. Display the first five records.
  5. Display the last five records.
  6. Find the shape of the dataset.
  7. Display dataset information (info()).
  8. Generate descriptive statistics (describe()).
  9. Check for missing values.
  10. Check for duplicate records.
  11. Separate the input features (X) and target variable (y).
  12. Split the dataset into training and testing sets.
  13. Apply feature scaling using StandardScaler.
  14. Build an Artificial Neural Network (ANN) model.
  15. Compile the ANN model.
  16. Train the model.
  17. Plot the training accuracy and training loss graphs.
  18. Evaluate the model on the test dataset.
  19. Predict the class labels for the test data.
  20. Generate the Confusion Matrix.
  21. Generate the Classification Report.
  22. Calculate the model accuracy.
  23. Predict diabetes status for a new patient record.
  24. Write observations based on the obtained results.
  25. Write the final conclusion.   



टिप्पणी पोस्ट करा

0 टिप्पण्या