0% found this document useful (0 votes)
51 views15 pages

Aiml PBL

Artificial intelligence and Machine Learning

Uploaded by

Abhishek Siddhe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views15 pages

Aiml PBL

Artificial intelligence and Machine Learning

Uploaded by

Abhishek Siddhe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

A

PBL REPORT
on
“Jaundice Prediction Model Using Naive Bayes Algorithm”

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS OF


THE COURSE OF THE
“ARTIFICIAL INTELLIGIENCE AND MACHINE LEARNING”

SUBMITTED BY:-

1) Mr. Khandu Sunil Mane (ROLL NO-208)


2) Mr. Rushikesh Prakash Sakhare (ROLL NO-211)
3) Mr. Abhishek Satish Siddhe (ROLL NO-231)
4) Mr. Vishal Sunil Dhotare (ROLL NO-232)

UNDER THE GUIDANCE OF


Mr. Sandeep Kadane
Assistant Professor,
Department of Mechanical Engineering

DEPARTMENT OF MECHANICAL ENGINEERING


KIT’S COLLEGE OF ENGINEERING (AUTONOMOUS), KOLHAPUR

1
CERTIFICATE

This is to certify that,

Name of candidates Roll No.


1) Mr. Khandu Sunil Mane (ROLL NO-208)
2) Mr. Rushikesh Prakash Sakhare (ROLL NO-211)
3) Mr. Abhishek Satish Siddhe (ROLL NO-231)
4) Mr. Vishal Sunil Dhotare (ROLL NO-232)
Have completed AIML work entitled “Jaundice Prediction Model Using Naive
Bayes Algorithm” under my supervision, in partial fulfillment of the
requirements for the course AIML. The report was submitted to the
DEPARTMENT OF MECHANICAL ENGINEERING, KITCoEK.

Mr. Sandeep Kadane Dr. Uday Bhapkar


Assistance Professor Head of Department
Department of Mechanical Engineering Department of Mechanical Engineering

18
INDEX

Sr.no. Contents Page no.

1 Introduction 2

2 Literature Review 3

3 4
The Problem Definition

4 Objectives 5

5 Dataset 6

6 Calculations 7-8

7 Program 9-10

8 Output 11

9 Conclusion 12

10 Reference 13

1
INTRODUCTION

Naïve Bayes algorithm is a supervised learning algorithm, which is based on


Bayes theorem and used for solving classification problems.
It is mainly used in text classification that includes a high-dimensional training
dataset.
Naïve Bayes Classifier is one of the simple and most effective Classification
algorithms which helps in building the fast machine learning models that can
make quick predictions.
It is a probabilistic classifier, which means it predicts on the basis of the
probability of an object.
Some popular examples of Naïve Bayes Algorithm are spam filtration,
Sentimental analysis, and classifying articles.

Bayes' theorem is also known as Bayes' Rule or Bayes' law, which is used to
determine the probability of a hypothesis with prior knowledge. It depends on
the conditional probability. The formula for Bayes' theorem is given as:
Naïve Bayes Classifier Algorithm.

Where :

• P(A∣B) is the posterior probability, or the probability of event A


occurring given that Bis true.
• P(B∣A) is the likelihood, or the probability of observing event B given that A is
true.
• P(A) is the prior probability, or the initial probability of event A before
observing B.
2
Literature Review

Jaundice, characterized by yellowing of the skin and dark urine due to elevated
bilirubin levels, is an important indicator of various underlying conditions like liver disease
and hemolytic anemia. Early diagnosis is critical, and machine learning (ML) models are
increasingly used in healthcare to predict jaundice based on patient data.

Machine Learning Models for Jaundice Prediction


Machine learning algorithms, such as Support Vector Machines (SVMs), decision trees,
and random forests, have been applied to predict jaundice. For instance, decision trees
use features like age, gender, and bilirubin levels to achieve high accuracy in diagnosing
jaundice, especially in pediatric patients. SVMs are also useful in differentiating jaundice
from other conditions with similar symptoms. These models typically offer fast, data-
driven solutions for predicting jaundice risk.

Types of Data Used


The data used for jaundice prediction includes clinical symptoms like yellowing of the
skin and dark urine, which are key indicators. Laboratory results such as bilirubin levels,
liver enzyme tests (ALT, AST), and blood counts are crucial for confirming the
condition. Demographic data, including age and medical history, also contribute to
improving prediction accuracy, as jaundice may present differently in neonates, children,
and adults.

Effectiveness and Performance


Studies have shown that ML models can achieve high accuracy in predicting jaundice,
with random forest models demonstrating accuracies of up to 90%. Sensitivity,
specificity, and area under the curve (AUC) are common metrics for evaluating these
models, highlighting their potential in early diagnosis.

Challenges
However, challenges remain in the integration of such models into clinical practice. Data
quality is a significant concern, as incomplete or inconsistent patient records can affect
model accuracy. Additionally, the interpretability of more complex models like deep
learning remains limited, which may hinder their adoption by clinicians.

3
Problem Definition

Statement

Develop a healthcare system that predicts the likelihood of a patient having jaundice based
on symptoms such as yellowing of the skin and dark urine

Problem Description:

Jaundice is a medical condition caused by elevated levels of bilirubin in the blood,


resulting in yellowing of the skin and eyes. Early and accurate diagnosis is critical for
effective treatment, but traditional diagnostic methods often require multiple tests and
time, leading to delays in treatment.

In healthcare settings, there is a need for a system that leverages patient data, such
as symptoms (yellowing of the skin, fatigue) and test results (bilirubin levels), to predict
the likelihood of jaundice. Such a system can assist medical professionals in making
quicker and more accurate decisions, improving patient outcomes

4
OBJECTIVES

1. Data Preparation and Processing:

Collect and preprocess patient data, including symptoms (e.g., yellowing of skin, fatigue) and lab
results (e.g., bilirubin levels). Handle missing or inconsistent data to ensure clean and reliable
inputs for the model.

2. Feature Selection:

Identify key attributes (features) most relevant to jaundice diagnosis, such as bilirubin levels, liver
function test results, and patient-reported symptoms. Reduce dimensionality if necessary to
improve model performance.

3. Model Training:

Implement the Naive Bayes algorithm to classify patients as "Jaundice" or "No Jaundice." Train
the model on labeled datasets of patient records, ensuring balanced classes for fair learning.

4. Probabilistic Analysis:

Calculate conditional probabilities for symptoms given the presence or absence of jaundice.
Leverage the Naive Bayes assumption of feature independence for simplicity and efficiency.

5. Model Validation and Testing:

Use a portion of the dataset for validation and testing to measure the accuracy, precision, recall,
and F1 score of the model. Tune hyperparameters to optimize performance.

5
Dataset

Person Jaundice Yellow Skin Dark Urine


(Yes/No) (Yes/No) (Yes/No)
1 Yes No Yes
2 No Yes Yes
3 Yes Yes Yes
4 No No No
5 Yes No Yes
6 No No Yes
7 Yes No Yes
8 Yes No No
9 No Yes Yes
10 No Yes No

6
Calculations

Apply Bayes Theorem,

P(Yes/Yellow Skin, Jaundice) = P(Yellow Skin/Yes) × P(Jaundice/Yes) × P(Yes)


P(Yellow Skin) x P(Jaundice)

P(No /Yellow Skin, Jaundice) = P(Yellow Skin/No) × P(Jaundice/ No) × P(No)


P(Yellow Skin) x P(Jaundice)

Step 1: Prior Probability


P(Dark Urine/Yes) = 7/10
P P(Dark Urine/No) = 3/10

Step 2: Conditional Probability

Yes No
Jaundice 4/7 2/3
Yellow Skin 3/7 2/3

7
P(Yes/Yellow Skin, Jaundice) = P(Yellow Skin/Yes) × P(Jaundice/Yes) × P(Yes)
P(Yellow Skin) x P(Jaundice)

= P(3/7) x P(4/7) x 7/10

= 0.17

P(No /Yellow Skin, Jaundice) = P(Yellow Skin/No) × P(Jaundice/ No) × P(No)


P(Yellow Skin) x P(Jaundice)

= P(2/3) x P(2/3) x 3/10

= 0.13

8
Program

9
10
Output

11
Conclusion

In this project, we developed a Naive Bayes classifier in Python to predict whether


a patient has jaundice based on symptoms such as yellow skin and dark urine. The process
involved encoding the symptoms and target variable numerically, calculating conditional
probabilities, and applying Bayes' theorem to predict the likelihood of jaundice. By using
a small dataset, the model was able to classify a new test case and predict whether the
patient had jaundice or not.

The Naive Bayes classifier proved to be a simple yet effective tool for binary
classification tasks, like predicting the presence of jaundice from observed symptoms.
However, its performance depends on the quality and size of the training data. While the
model worked well with the small dataset used here, larger, more diverse datasets would
improve its accuracy and generalizability.

This approach highlights the potential of Naive Bayes in healthcare applications,


where it can assist in early disease detection and support decision-making by predicting
medical conditions based on patient symptoms.

12
References

1. Rish, I. (2001). An empirical study of the naive Bayes classifier.


Proceedings of the IJCAI-01 Workshop on Empirical Methods in Artificial
Intelligence, 41-46.

2. Pazzani, M. J., & Billsus, D. (2007). Learning and extracting relational rules
using inductive logic programming for text classification. Machine
Learning, 31(1), 49-69.

3. Kumar, S., & Tanwar, S. (2020). Application of Machine Learning in


Healthcare: A Survey. Artificial Intelligence in Medicine, 105, 101931.

4. Shen, D., Wu, G., & Suk, H. I. (2017). Deep learning in medical image
analysis. Annual Review of Biomedical Engineering, 19, 221-248.

13

You might also like