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
| Attribute | Description |
|---|---|
| Pregnancies | Number of pregnancies |
| Glucose | Plasma glucose concentration |
| BloodPressure | Diastolic blood pressure (mm Hg) |
| SkinThickness | Triceps skin fold thickness (mm) |
| Insulin | Two-hour serum insulin (mu U/ml) |
| BMI | Body Mass Index |
| DiabetesPedigreeFunction | Diabetes pedigree function (family history score) |
| Age | Age of the patient (years) |
| Outcome | Diabetes status (0 = No, 1 = Yes) |
Steps to Follow (Assignment)
- Import the required Python libraries.
- Load the Pima Indians Diabetes Dataset.
- Assign appropriate column names to the dataset.
- Display the first five records.
- Display the last five records.
- Find the shape of the dataset.
-
Display dataset information (
info()). -
Generate descriptive statistics (
describe()). - Check for missing values.
- Check for duplicate records.
- Separate the input features (X) and target variable (y).
- Split the dataset into training and testing sets.
-
Apply feature scaling using
StandardScaler. - Build an Artificial Neural Network (ANN) model.
- Compile the ANN model.
- Train the model.
- Plot the training accuracy and training loss graphs.
- Evaluate the model on the test dataset.
- Predict the class labels for the test data.
- Generate the Confusion Matrix.
- Generate the Classification Report.
- Calculate the model accuracy.
- Predict diabetes status for a new patient record.
- Write observations based on the obtained results.
- Write the final conclusion.
0 टिप्पण्या
कृपया तुमच्या प्रियजनांना लेख शेअर करा आणि तुमचा अभिप्राय जरूर नोंदवा. 🙏 🙏