[Solved]LDA classifier puts everything in Class 3

Moderator: Statistisches Maschinelles Lernen

MFB
Erstie
Erstie
Beiträge: 21
Registriert: 3. Okt 2013 17:10

[Solved]LDA classifier puts everything in Class 3

Beitrag von MFB »

Hello,

my lda classifier puts every sample into Class3, even the mean of the second class...
My lda score function is


log(prior)-0.5*mean*\Sigma^{-1}*mean^{T}+mean*\Sigma^{-1}*sample^{T}


Sigma is the 2x2 symmetric, positive definite pooled CovarianceMatrix
mean is a 1x2 vector containing the mean of each feature in a class
sample is the sample to be classified in form of an 1x2 vector
prior is the prior of the Class

BTW: Tex doesn't work
Zuletzt geändert von MFB am 21. Jun 2018 15:17, insgesamt 2-mal geändert.

tanne
Endlosschleifenbastler
Endlosschleifenbastler
Beiträge: 162
Registriert: 30. Sep 2008 16:05

Re: LDA classifier puts everything in Class 3

Beitrag von tanne »

If it's not just a typo, you are missing the inverse of the second sigma.

MFB
Erstie
Erstie
Beiträge: 21
Registriert: 3. Okt 2013 17:10

Re: LDA classifier puts everything in Class 3

Beitrag von MFB »

Sorry, it was a typo.

MFB
Erstie
Erstie
Beiträge: 21
Registriert: 3. Okt 2013 17:10

Re: LDA classifier puts everything in Class 3

Beitrag von MFB »

I figured it out.
I have been calculating Sigma wrong.

Antworten

Zurück zu „Statistisches Maschinelles Lernen“