MATLAB中的coeff,matlab中pcacov这个命令的作用???

pcacov

Principal components analysis (PCA) using the covariance matrix

Syntax

COEFF = pcacov(V)

[COEFF, latent] = pcacov(V)

[COEFF, latent, explained] = pcacov(V)

Description

COEFF = pcacov(V) performs principal components analysis on the p-by-p covariance matrix V and returns the principal component coefficients, also known as loadings. COEFF is a p-by-p matrix, with each column containing coefficients for one principal component. The columns are in order of decreasing component variance.

pcacov does not standardize V to have unit variances. To perform principal components analysis on standardized variables, use the correlation matrix R = V./(SD*SD')), where SD = sqrt(diag(V)), in place of V. To perform principal components analysis directly on the data matrix, use princomp.

[COEFF, latent] = pcacov(V) returns latent, a vector containing the principal component variances, that is, the eigenvalues of V.

[COEFF, latent, explained] = pcacov(V) returns explained, a vector containing the percentage of the total variance explained by each principal component.

Example

load hald

covx = cov(ingredients);

[COEFF, latent, explained] = pcacov(covx)

COEFF =

0.0678 -0.6460 0.5673 -0.5062

0.6785 -0.0200 -0.5440 -0.4933

-0.0290 0.7553 0.4036 -0.5156

-0.7309 -0.1085 -0.4684 -0.4844

variances =

517.7969

67.4964

12.4054

0.2372

explained =

86.5974

11.2882

2.0747

0.0397

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值