Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. This problem works with the Chilean voting data as in chilean voting.r where the data matrix is x. The age variable can be simplified

1. This problem works with the Chilean voting data as in chilean

voting.r where the data matrix is x. The age variable can be simplified to retain only the decade of the person by using

x[,5] = floor(x[,5]/10)

(a) Using this simplification, create a 3-dimensional table on age, education and vote. Show your code and

your output.

(b) Using this table create a Bayes classifier to predict the voting status of a person given their decade and

education level. You can represent your classifier as we have done in class. That is, as a table where

the rows account for all possible configurations of the decade and education variables, giving the vote

classification for each.

(c) How would the Bayes classifier classify a female, post-secondary-educated person from the SA region in

her 50s?

(d) Expalin your degree of confidence in this classification and why you believe this.

(e) Estimate the prior distribution on the vote (Y or N) using the data.

(f) Separately for both the Yes and No voters, estimate the class-conditional distributions for gender, education, region, and age. For instance, for gender you would need to compute four probabilities:

P(F |Y es),P(M | Yes),P(F | No),P(M | No)

(g) How would the naive Bayes classifier classify a female, post-secondary-educated person from the SA region

in her 50s? Show the calculations clearly.

The Chilean data is already imbeded into R. Otherwise the alternative link is- https://socialsciences.mcmaster.ca/jfox/Books/Applied-Regression-3E/datasets/Chile.txt

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems X Special Issue On Database And Expert Systems Applications Lncs 8220

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2013th Edition

3642412203, 978-3642412202

More Books

Students also viewed these Databases questions