Question

Consider the following data set. You are asked to predict the class label (if Stolen =...

Consider the following data set. You are asked to predict the class label (if Stolen = Yes or No) for a test data point “X” where “X” = (color=Red, Type=SUV, Origin=Domestic) using the Naïve Bayes approach. Show every step and calculation details.

Color

Type

Origin

Stolen

1

Red

Sports

Domestic

Yes

2

Red

Sports

Domestic

Yes

3

Red

Sports

Domestic

Yes

4

Yellow

Sports

Domestic

No

5

Yellow

Sports

Import

Yes

6

Yellow

SUV

Import

No

7

Yellow

SUV

Import

Yes

8

Yellow

SUV

Domestic

No

9

Red

SUV

Import

Yes

10

Red

Sports

Import

Yes

0 0
Add a comment Improve this question Transcribed image text
Answer #1

By Naive Bayes approach we can classify samples which are unseen and here we have to classify (color=Red, Type=SUV, Origin=Domestic) so we have the formula for classification by this approach which is as follows:

P(C|X)=[P(X|C)*P(C)] / P(X)

where 'C' stands for values of the class(Yes and no in this case from stolen class) and 'X' stands values of particular attribute other than class attribute(Red and yellow from the attribute color likewise other values also from their respective attribute)

P(C)=prior probability

P(X)=probability of X

P(X|C)=likelihood

P(C|X)=posterior probability

But for practical classification of data we only use the "P(X|C)*P(C)" from the formula and search for it's maximum value.

P(C) can be found out easily and for P(X|C) we use the the following formula

P(X|C)=II k-1 P(Xk|C)

Now let's get back to your problem

By the class label "stolen" from the dataset we can find the probabilities of "yes"and "no" as follows:

P(Yes)=Number of yes/Total number of tuples = 7/10

P(No)=Number of no/Total number of tuples = 3/10

Now let us find out P(X|C) for all other attributes

1)Color

P(Red|Yes)=5/7 P(Red|No)=0
P(Yellow|Yes)=2/7 P(Yellow|No)=3/3

2)Type

P(SUV|Yes)=2/7 P(SUV|No)=2/3
P(Sports|Yes)=5/7 P(Sports|No)=1/3

3)Origin

P(Domestic|Yes)=3/7 P(Domestic|No)=2/3
P(Import|Yes)=4/7 P(Import|No)=1/3

In order to classify the unseen sample (color=Red, Type=SUV, Origin=Domestic) the final formula that is P(X|C)*P(C) is used and the working is as below:

P(X|Yes)*P(Yes) = P(Red|Yes) * P(Domestic|Yes) * P(SUV|Yes) * P(Yes)

=5/7 * 3/7 * 2/7 * 7/10

=0.0612

P(X|No)*P(No) = P(Red|No) * P(Domestic|No) * P(SUV|No) * P(No)

=0 * 2/3 * 2/3 * 3/10

=0

After finding the final values we can clearly see 0.0612 > 0 hence our unseen sample (color=Red, Type=SUV, Origin=Domestic) gets classifies as "Yes" that means under class label "stolen" this unseen sample is having value as "Yes".

Add a comment
Know the answer?
Add Answer to:
Consider the following data set. You are asked to predict the class label (if Stolen =...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Suppose that we have the data below, where Stolen is the target attribute that consists of...

    Suppose that we have the data below, where Stolen is the target attribute that consists of binary values (yes or no). Color Type Origin Stolen red sports domestic yes red sports domesticno red sports domestic yes yellow sports domestic no yellow sports imported yes yellow Suy imported no yellow suy imported yes yellow suv domesticno red Suy imported no red sports imported yes You have a naive bayes model and a new test instance with attributes color=red, type=suv and origin=imported....

  • write question 1 ASAP CIS 321 -Intro. to Prob. and Stats Quiz #3-Chapters 10 and 12...

    write question 1 ASAP CIS 321 -Intro. to Prob. and Stats Quiz #3-Chapters 10 and 12 + Bayesian Classification Reza Zafarani-Spring 2018 Name (2pts): Problem 1 Covariance [4pts] Let X and Y be two and Cor(X, Y) random variables. Express Cor(XX + y) in termd Var(XY) Problem 2 - Poisson Distribution (6pts In a computer network, the sumber of lost connections in a second C is modeled as oed, PIC 0), is 10, What is the expected number of lost...

  • 07. [Classification] Consider the following data set for a binary-class problem. [20] Customer ID Gender M...

    07. [Classification] Consider the following data set for a binary-class problem. [20] Customer ID Gender M Class CO CO M M M M Car Type Family Sports Sports Sports Sports Sports Sports Sports Sports Luxury Family Family Family Luxury Luxury Luxury Luxury Luxury Luxury Luxury Shirt Size Small Medium Medium Large Extra Large Extra Large Small Small Medium Large Large Extra Large Medium Extra Large Small Small Medium Medium Medium 888885555555555 Large 1. Compute the Gini index for the overall...

  • 1. Consider the following data: 18, 20, 25, 31, 32, 38, 39, 40, 43, 49, 51,...

    1. Consider the following data: 18, 20, 25, 31, 32, 38, 39, 40, 43, 49, 51, 54, 65, 74 Use 4 classes. a. Class width : b. Complete the following table. ????? ?????? ????? − ????? Class Boundaries Midpoint Frequencies Relative Frequencies Cumulative Frequencies c. Draw a histogram. d. Draw a relative frequency histogram. e. Make a stem-and-leaf display. f. Find the interquartile range. g. Make a box-and-whisker plot. h. Determine the distribution shape. Please comment on all three plots....

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

  • The following are screen grabs of the provided files Thanks so much for your help, and have a n...

    The following are screen grabs of the provided files Thanks so much for your help, and have a nice day! My Java Programming Teacher Gave me this for practice before the exam, butI can't get it to work, and I need a working version to discuss with my teacher ASAP, and I would like to sleep at some point before the exam. Please Help TEST QUESTION 5: Tamagotchi For this question, you will write a number of classes that you...

  • just making sure did I do right in number 10. and im confused at number 11...

    just making sure did I do right in number 10. and im confused at number 11 and 12 13. becausse we didnt learn in class. please help. thanks for your patient PROCEDURE 1. This experiment is to be conducted individually. on the side shelf: small squares of copper, NaOH, HSO in the hood: conc. HNOs, conc. HC 2. The following items will be found 4 Use your brush and some soap solution to wash your casserole dish as well as...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT