You are on page 1of 2

School of Computer Science Engineering and Technology

Course- MCA/MTech./Ph.D. Type- AI Core-1


Course Code- CMCA520/CSET520 Course Name- Statistical Machine Learning
Year- 1st Year Semester- ODD
Date- 11/10/2022 Batch-

Lab Assignment - 4 (10rd to 14th Oct. 2022)

Exp. No. Name CO1 CO2 CO3


04 Bayes Theorem 🗸 🗸

Objective: Finding probability by applying Bayes theorem and applying Bayesian


Classifier on dataset for finding probability of an event and accuracy of
model.

1. Given the following facts find a probability of dangerous fires when smoke outside
• The probability of dangerous fires is rare (1%)
• but smoke is fairly common (10%) due to barbecues,
• 90% of dangerous fires make smoke

2. Consider the data set shown in Table 1


a. Calculate the conditional probabilities for P (A=1|-), P
(B=1|+), P (C=1|+), P (A=1|+), P (B=1|-), and P (C=1|-).
b. Use the estimate of conditional probabilities given in the
previous question to predict the class label for a test sample (+
| A = 0, B = 1) using the naive Bayes approach.
3. Load breast cancer dataset from sklearn.datasets and perform the necessary preprocessing
(scaling, label encoding, etc.). Train the model for Naïve Bayes classification and evaluate the
performance (accuracy, AUC, precision, recall, ) in 70%-30% and 10-Fold setup.
from sklearn.datasets import load_breast_cancer
data = load_breast_cancer()

Classes 2
Samples per class 212(M), 357(B)
Samples total 569
Dimensionality 30
Features real, positive

You might also like