Gaussian Discriminant Analysis

I am still deriving the parameters post applying MLE.

ℓ(ϕ,μ0,μ1,Σ)=log⁡∏i=1mp(x(i),y(i);ϕ,μ0,μ1,Σ)=log⁡∏i=1mp(x(i)|y(i);μ0,μ1,Σ)p(y(i);ϕ)=∑i=1mlog⁡p(x(i)|y(i);μ0,μ1,Σ)p(y(i);ϕ)

abstracting it we get:

ℓ(ϕ,μk,Σ)=∑i=1mlog⁡p(x(i)|y(i);μk,Σ)p(y(i);ϕ)=∑i=1m[−n2log⁡2π−12log⁡|Σ|−12(xi−μk)TΣ−1(xi−μk)+yilog⁡ϕ+(1−yi)log⁡(1−ϕ)]

Taking Derivative on that equation we get the following values:

ϕ=1m∑i=1m1{y(i)=1}μk=∑i=1m1{y(i)=k}x(i)∑i=1m1{y(i)=k}Σ=1m∑i=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 Σ.