2018-10-24
閱讀量:
1079
主成份分析各指標(biāo)的貢獻(xiàn)率
在factoextra包中對(duì)貢獻(xiàn)率有一個(gè)繪圖。圖中有參考線,高于此線的認(rèn)為變量是顯著的,隨著變量的多少這個(gè)值是不同的。
library(factoextra)
? ? library(FactoMineR)
? ? df <- decathlon2[1:23, 1:10]
? ? res.pca <- PCA(df,??graph = FALSE)
? ? fviz_contrib(res.pca, choice = "var", axes = 1, top = 10)
包的幫助中說了這個(gè)參考線,但沒說這個(gè)線對(duì)應(yīng)的值是多少:
A reference dashed line is also shown on the barplot. This reference line corresponds to the expected value if the contribution where uniform. For a given dimension, any row/column with a contribution above the reference line could be considered as important in contributing to the dimension.
終于眼尖的我在函數(shù)的原文件中找到了答案:
是100/length(contrib)
也就是100除以變量個(gè)數(shù)







評(píng)論(0)


暫無(wú)數(shù)據(jù)
CDA考試動(dòng)態(tài)
CDA報(bào)考指南
推薦帖子
0條評(píng)論
0條評(píng)論
0條評(píng)論
0條評(píng)論