Principal Components variance explained

Sett 30 ganger
Hopp til første uleste melding

Brent Pedersen

ulest,
12. jan. 2017, 13:39:5812.01.2017
til gonum-dev
Hi, I'm using stat.PC and just verifying that I'm not missing a way to get the proportion of the total variance explained?

The way I can see is to take the sum of the the row-wise variances and then divide the pc.Vars() by that. 

thanks,
-Brent

Dan Kortschak

ulest,
12. jan. 2017, 16:07:1912.01.2017
til Brent Pedersen, gonum-dev

pov := pc.Vars(nil)
floats.Scale(1/floats.Sum(pov), pov)

--
afk
Dan

Brent Pedersen

ulest,
12. jan. 2017, 16:35:2812.01.2017
til Dan Kortschak, gonum-dev
perfect. Thank you.
Svar alle
Svar til forfatter
Videresend
0 nye meldinger