Gaussian Discriminant Analysis

I am still deriving the parameters post applying MLE.

(ϕ,μ0,μ1,Σ)=logi=1mp(x(i),y(i);ϕ,μ0,μ1,Σ)=logi=1mp(x(i)|y(i);μ0,μ1,Σ)p(y(i);ϕ)=i=1mlogp(x(i)|y(i);μ0,μ1,Σ)p(y(i);ϕ)

abstracting it we get:

(ϕ,μk,Σ)=i=1mlogp(x(i)|y(i);μk,Σ)p(y(i);ϕ)=i=1m[n2log2π12log|Σ|12(xiμk)TΣ1(xiμk)+yilogϕ+(1yi)log(1ϕ)]

Taking Derivative on that equation we get the following values:

ϕ=1mi=1m1{y(i)=1}μk=i=1m1{y(i)=k}x(i)i=1m1{y(i)=k}Σ=1mi=1m(x(i)μy(i))(x(i)μy(i))T

Posterior Probability in Gaussian Discriminant Analysis

We have the posterior probability of class 1 given the input x as:

p(y=1|x;ϕ)=p(y=1|x;ϕ)p(x|μ1,Σ)p(y=1|x;ϕ)p(x|μ1,Σ)+p(y=0|x;ϕ)p(x|μ0,Σ)

Given the class priors and the likelihoods, we can write this as:

p(y=1|x;ϕ)=ϕN(x|μ1,Σ)ϕN(x|μ1,Σ)+(1ϕ)N(x|μ0,Σ)

Rewriting the above equation, we have:

p(y=1|x;ϕ)=11+(1ϕ)N(x|μ0,Σ)ϕN(x|μ1,Σ)

Since the Gaussian distribution is a member of the exponential family, we can eventually express the ratio in the denominator as exp(θTx), where θ is a function of ϕ,μ0,μ1, and Σ.