Question

Given the following dataset with 2 features and 3 classes: Class 2 1 UniDegree YES NO NO NO YES YES NO YES YES Like Rock Musi

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

a) P(LikeRockMusic=NO)=4/9 [ Explanation: There are total 9 records. Out of it 4 records are LikeRockMusic=NO. Hence the probability is 4/9]

b) P(UniDegree=YES|class=2) =1/2 [ Explanation: There are 2 records with class=2. Out of it 1 record is UniDegree=YES. Hence the probability is 1/2]

c) P(LikeRockMusic=YES|UniDegree=NO)= 1/4 [Explanation: There are 4 records with UniDegree=NO. Out of it 1 record is LikeRockMusic=YES. Hence the probability is 1/4]

d) There are three classes 1,2,3.

We need to calculate the following. The test sample given has UniDegree=YES and LikeRockMusic=YES.

P(Class 1)=3/9=1/3 [ Explanation: There are 3 records with class=1 out of 9 records. Hence the probability is 1/3]

P(Class 2)=2/9 [ Explanation: There are 2 records with class=2 out of 9 records. Hence the probability is 2/9]

P(Class 3)=4/9 [ Explanation: There are 4 records with class=3 out of 9 records. Hence the probability is 4/9]

Next we need to compute

P(UniDegree=YES| class=1) =2/3 [Explanation: There are 2 records with UniDegree=YES in class 1. Class 1 contains 3 records Hence the probability is 2/3]

P(UniDegree=YES|class=2)= 1/2 [Explanation: There is 1 record with class=2 and UniDegree=YES. Class 2 contains 2 records. Hence the probability is 1/2]

P(UniDegree=YES|class=3) =2/4 [Explanation: There are 2 records with UniDegree=YES in class 3. Class 3 contains 4 records Hence the probability is 2/4]

P(LikeRockMusic=YES|class=1)=3/3=1 [Explanation: There are 3 records with LikeRockMusic=YES in class 1. Class 1 contains 3 records Hence the probability is 3/3]

P(LikeRockMusic=YES|class=2)=1/2 [Explanation: There is 1 record with LikeRockMusic=YES in class 2. Class 2 contains 2 records Hence the probability is 1/2]

P(LikeRockMusic=YES|class=3)=1/4 [Explanation: There is 1 record with LikeRockMusic=YES in class 3. Class 3 contains 4 records Hence the probability is 1/4]

Compute the following for Class 1

P(UniDegree=YES| class=1) =2/3 * P(LikeRockMusic=YES|class=1)=3/3=1 = 2/3*1=2/3

Compute the following for Class 2

P(UniDegree=YES|class=2)= 1/2 * P(LikeRockMusic=YES|class=2)=1/2 = 1/2* 1/2 = 1/4

Compute the following for Class 3

P(UniDegree=YES|class=3) =2/4 =1/2 * P(LikeRockMusic=YES|class=3)=1/4 = 1/2*1/4=1/8

The final probabilities can be calculated for Class 1 as follows.

P(Class 1)=3/9=1/3 *[ P(UniDegree=YES| class=1) =2/3 * P(LikeRockMusic=YES|class=1)=3/3=1 = 2/3*1=2/3]

=1/3 * 2/3=2/9

The final probabilities can be calculated for Class 2 as follows.

P(Class 2)=2/9 * [ P(UniDegree=YES|class=2)= 1/2 * P(LikeRockMusic=YES|class=2)=1/2 = 1/2* 1/2 = 1/4]

=2/9* 1/4 = 2/36=1/18

The final probabilities can be calculated for Class 3 as follows.

P(Class 3)=4/9 *[ P(UniDegree=YES|class=3) =2/4 =1/2 * P(LikeRockMusic=YES|class=3)=1/4 = 1/2*1/4=1/8]

=4/9 *1/8 = 4/72=1/18

Since both Class 2 and Class 3 both have the maximum value of 1/18, the test sample belongs to Class 2 or Class 3

Add a comment
Know the answer?
Add Answer to:
Given the following dataset with 2 features and 3 classes: Class 2 1 UniDegree YES NO...
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
  • 5. Imagine you have a 6-class classification problem, where the dataset contains 9 input features...

    5. Imagine you have a 6-class classification problem, where the dataset contains 9 input features. You decide to build a classifier using a "mixture of mixtures", i.e. using a Gaussian mixture model for each likelihood (p(x(9). 3 mixture components are used with diagonal covariance mlatrices for each mixture model. Calculate the total number of model parameters in the classifier (do not consider priors) 5. Imagine you have a 6-class classification problem, where the dataset contains 9 input features. You decide...

  • Imagine you have a 6-class classification problem, where the dataset contains 9 input features. Y...

    Imagine you have a 6-class classification problem, where the dataset contains 9 input features. You decide to build a classifier using a “mixture of mixtures”, i.e. using a Gaussian mixture model for each likelihood (p(x|θ)). 3 mixture components are used with diagonal covariance matrices for each mixture model. Calculate the total number of model parameters in the classifier (do not consider priors).

  • 1. Given that P(E) = 0.42, P(F) = 0.42, and P(E ∩ F) = 0.08. Find...

    1. Given that P(E) = 0.42, P(F) = 0.42, and P(E ∩ F) = 0.08. Find P(E ∪ F). 2. A campus radio station surveyed 500 students to determine the types of music they like. The survey revealed that 205 like rock, 158 like country, and 120 like jazz. Moreover, 25 like rock and country, 27 like rock and jazz, 20 like country and jazz, and 7 like all three types of music. What is the probability that a randomly...

  • 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...

  • 2. Giving the following training dataset: B Label Image 1 0-100 171-255 0-150 Yes Tree Image...

    2. Giving the following training dataset: B Label Image 1 0-100 171-255 0-150 Yes Tree Image 2 101-170 0-100 151-255 No not Tree Image 3 171-255 101-170 151-255 Yes Tree Image 4 101-170 0-100 151-255 No not Tree Image 5 171-255 101-170 151-255 No Tree Image 6 101-170 0-100 0-150 No not Tree Image 7 101-170 0-150 Yes not Tree 0-100 0-100 Image 8 101-170 151-255 Yes Tree Image 9 101-170 171-255 0-150 No not Tree Image 10 171-255 101-170...

  • 5.1.) Suppose that a researcher, using data on class size (CS) and average test scores from 100 third-grade classes, es...

    5.1.) Suppose that a researcher, using data on class size (CS) and average test scores from 100 third-grade classes, estimate the simple linear regression: Test Score = 520.4-5.82 x CS, n= 100, R2 = 0.08. (20.4) (2.21) (a) A classroom has 22 students. What is the model's prediction for that classroom's average test score? (b) Last year a classroom had 19 students, and this year it has 23 students. What is the model's prediction for the change in the classroom...

  • 3. Do you see any striking difference between problem 1 and 2? At a certain university,...

    3. Do you see any striking difference between problem 1 and 2? At a certain university, the mean income of parents of the entering class is reported to by $91,600. The president of another university feels that the parents’ income for her entering class is more than $91,600. She surveys 100 randomly selected families and finds the mean income to be $96,321. Given σ = $9555. With α = 0.05, is she correct? State the null and alternative hypotheses which...

  • Narrative: Classes 1 and 2 Suppose a 95% confidence interval for between Class 1 and Class...

    Narrative: Classes 1 and 2 Suppose a 95% confidence interval for between Class 1 and Class 2 (in that These results were based on independent sample class. confidence interval for the difference in test scores nd Class 2 (in that order) is the following: 9+/- 2. ependent samples of size 100 from each 17. Classes 1 and 2 narrative) What can you conci ou are confident that the averages for Class 1 and Class 2 are significantly different b. You...

  • (2 points) We want to test whether or not more students are absent on Friday afternoon...

    (2 points) We want to test whether or not more students are absent on Friday afternoon classes than on Wednesday afternoon classes. In a random sample of 300 students with Friday afternoon classes, 62 missed the class. In a different random sample of 300 students with Wednesday afternoon classes, 20 missed the class. The table below summarizes this information. The standard error (SE) is given to save calculation time if you are not using software. Class Day Friday total #...

  • 1. Please use this dataset to answer the following questions: 4, 3, 6, 5, 3, 2,...

    1. Please use this dataset to answer the following questions: 4, 3, 6, 5, 3, 2, 4, 5, 7, 6, 3, 4, 6, 6, 1, 7, 8, 8, 23, 4, 0, 2, 6, 9, 6, 1, 5, 7, 4, 5 (1) Please calculate mean, median and mode. (2) Please calculate sample standard deviation. (3) According to your answer in part (2), please explain why sample standard deviation can never be negative. (4) Please calculate first quartile, second quartile, and third...

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