Computers and Technology

In class, we learned a Nave Bayes classi er for binary feature values, i. e., xj 2 f0; 1g where we model the class conditional distribution to be Bernoulli. In this exercise, you are going to extend the result to the case where features that are non-binary. We are given a training set f(x(i); y(i)); i = f1; ;mgg, where x(i) 2 f1; 2; ; sgn and y(i) 2 f0; 1g. Again, we model the label as a biased coin with 0 = P(y(i) = 0) and 1 0 = P(y(i) = 1). We model each non-binary feature value x(i) j (an element of x(i)) as a biased dice for each class. This is parameterized by:
P(zj-s|y = 1) = θ.sly=1
Notice that we do not model P(aj sly = 0) and Pu; = sly = 1) directly. Instead we use the above equations to guarantee all probabilities for each class sum to 1.
A) Using the Naive Bayes (NB) assumption, write down the joint probability of the data: in terms of the parameters θο, θjkly-0 and ,,k y-1. You mlay find the indicator function 1(-) useful.
B) Maximizing the joint probability you get in (a) with respect to o, ,ky-o and jk y-1. Write down your resulting θο, θ, k y 0 and θ.kl,-1 and show intermediate steps.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:50, CrusaderLord
Define a class named movie. include private fields for the title, year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie. write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields. this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie. settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie. setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie. setdirector(temp); //display all the data myfavoritemovie. displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie. cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
image
Computers and Technology, 23.06.2019 04:00, china236
In a word processing program, such as microsoft word, which feature to you choose the desired picture enhancement?
Answers: 2
image
Computers and Technology, 23.06.2019 17:00, Alexaisokay1
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, erjalinalii
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
Do you know the correct answer?
In class, we learned a Nave Bayes classi er for binary feature values, i. e., xj 2 f0; 1g where we m...

Questions in other subjects:

Konu
Biology, 12.01.2021 18:50