0% found this document useful (0 votes)
13 views

Lab Report 02

Uploaded by

Sajjad Khan8254
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Lab Report 02

Uploaded by

Sajjad Khan8254
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Green University of Bangladesh

Department of Computer Science and Engineering(CSE)


Faculty of Sciences and Engineering
Semester: (Spring, Year:2024), B.Sc. in CSE (Day)

LAB REPORT NO 02
Course Title: Machine Learning Lab
Course Code: CSE 412 Section:212-D3

Lab Experiment Name: Logistic Regression on the Diabetes Dataset

Student Details

Name ID

1. MD. Sajjad Hossen. 212902032

Lab Date : 17/09/2024


Submission Date : 20/10/2024
Course Teacher’s Name : Md. Atikuzzaman

[For Teachers use only: Don’t Write Anything inside this box]

Lab Report Status


Marks: ………………………………… Signature:.....................
Comments:.............................................. Date:..............................
1. TITLE OF THE LAB EXPERIMENT
Diabetes dataset from the following link and predict if a person is diabetic
using a Logistic Regression algorithm.
2. OBJECTIVES/AIM
1. To predict whether a person is diabetic based on their health data using the Logistic Regression
algorithm.
2. To analyze the performance of the Logistic Regression classifier on the Diabetes dataset.
3. PROCEDURE / ANALYSIS / DESIGN
1. Download the Diabetes dataset from Kaggle.
2. Load the dataset into a Pandas DataFrame.
3. Preprocess the data by splitting it into training and testing sets, and standardize the features.
4. Train the Logistic Regression model using the training data.
5. Evaluate the model’s performance using accuracy, confusion matrix, and classification
report.
4. IMPLEMENTATION

Step 1: Import Libraries and Load Dataset

Step 2: Separate the features


Step 3: Split the data into training and testing sets

Step 4: Standardize the features

Step 5: Train the logistic Regression model

Step 6: Predict the outcomes on the test data


Step 7: Visualize the confusion matrix

5. TEST RESULT / OUTPUT

Step 1: Dataset visualization outputshow

Step 6: Predict the outcomes on the test data outputshow


Step 7: Visualize the confusion matrix outputshow

6. ANALYSIS AND DISCUSSION


1. The model's accuracy of 77% is decent, but there's room for improvement, especially in
identifying diabetic patients (class 1).
2. The confusion matrix indicates that the model was more accurate at predicting non-diabetic
individuals (class 0) but struggled with a few false negatives.
3. Logistic Regression is a good baseline algorithm for binary classification, and tuning
hyperparameters or using more advanced techniques like decision trees or random forests
might yield better results on this dataset.

You might also like