Linear discriminant function x2 d(x)=w,x How should we determine the coefficients l.e. the w s
11 Linear Discriminant Function How should we determine the coefficients, i.e. the wi ’s?
Linear Discriminant Function(2) (x) (x)=o 3 lines separating classes d1(x)-d3(x)=O d2(x)-d3(x)=0 di-d. 2 2x1+I=o
12 Linear Discriminant Function (2) 3 lines separating 3 classes
An Example Using The Naive Bayesian Approach Luk Tang Pong Cheng B/s Buy Sell Buy Buy Buy Sell Buy Sell Hold Sell Buy Buy Sell BuyBuy Buy Sell Hold Sel Buy BBSSSB Sell Hold Sell Sell HoldHold Sell Sell Buy Buy Buy Buy Buy Hold Sell Buy Sell Buy Sell Buy Buy Buy Sell Sell Hold Buy Buy Sell Hold Sell Sell Buy SBSSSSSB Sel‖! BuyBuy Sell
13 An Example Using The Naïve Bayesian Approach Luk Tang Pong Cheng B/S Buy Sell Buy Buy B Buy Sell Buy Sell B Hold Sell Buy Buy S Sell Buy Buy Buy S Sell Hold Sell Buy S Sell Hold Sell Sell B Hold Hold Sell Sell S Buy Buy Buy Buy B Buy Hold Sell Buy S Sell Buy Sell Buy S Buy Buy Sell Sell S Hold Buy Buy Sell S Hold Sell Sell Buy S Sell Buy Buy Sell B
The Example Continued On one particular day, if Luk recommends sell Tang recommends Se‖ Pong recommends Buy, and Cheng recommends buy w If P(Buy L=sell, T=Sell, P=Buy, Cheng=Buy)> P(Sell L=Sell, T=Sell, P=Buy, Cheng=Buy) Then BUY Else Sell s How do we compute the probabilities?
14 The Example Continued On one particular day, if – Luk recommends Sell – Tang recommends Sell – Pong recommends Buy, and – Cheng recommends Buy. If P(Buy | L=Sell, T=Sell, P=Buy, Cheng=Buy)> P(Sell | L=Sell, T=Sell, P=Buy, Cheng=Buy) Then BUY – Else Sell How do we compute the probabilities?
The Bayesian Approach I Given a record characterized by n attributes Ⅹ=<X1Xn> Calculate the probability for it to belong to a class cir P(C|ⅨX=prob. that record×=<X1r…,Xk>isof class c Ie.P(C|Ⅹ)=P(C|X1…,×) X is classified into C; if P(cilX) is the greatest amongst all
15 The Bayesian Approach Given a record characterized by n attributes: – X=<x1 ,…,xn>. Calculate the probability for it to belong to a class Ci . – P(Ci |X) = prob. that record X=<x1 ,…,xk> is of class Ci . – I.e. P(Ci |X) = P(Ci |x1 ,…,xk ). – X is classified into Ci if P(Ci |X) is the greatest amongst all