PcaGrid(rrcov)
PcaGrid()所属R语言包:rrcov
Robust Principal Components based on Projection Pursuit (PP): GRID search Algorithm
强大的基于主成分投影寻踪(PP):GRID搜索算法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes an approximation of the PP-estimators for PCA using the grid search algorithm in the plane.
计算一个近似的估计为PP-PCA在飞机上使用网格搜索算法。
用法----------Usage----------
PcaGrid(x, ...)
## Default S3 method:
PcaGrid(x, k = 0, kmax = ncol(x), scale=FALSE, na.action = na.fail, trace=FALSE, ...)
## S3 method for class 'formula'
PcaGrid(formula, data = NULL, subset, na.action, ...)
参数----------Arguments----------
参数:formula
a formula with no response variable, referring only to numeric variables.
没有响应变量的公式,只给数值变量。
参数:data
an optional data frame (or similar: see model.frame) containing the variables in the formula formula.
一个可选的数据框(或相似:model.frame),其中包含公式formula中的变量。
参数:subset
an optional vector used to select rows (observations) of the data matrix x.
的可选的向量选择行(观察)的数据矩阵x。
参数:na.action
a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The default is na.omit.
一个函数,它表示当数据包含NA的,应该发生什么。默认设置是由na.action的options,是na.fail,如果是没有设置的。默认的na.omit。
参数:...
arguments passed to or from other methods.
传递的参数或其他方法。
参数:x
a numeric matrix (or data frame) which provides the data for the principal components analysis.
一个数字矩阵(或数据框),它提供的数据,主成分分析。
参数:k
number of principal components to compute. If k is missing, or k = 0, the algorithm itself will determine the number of components by finding such k that l_k/l_1 >= 10.E-3 and Σ_{j=1}^k l_j/Σ_{j=1}^r l_j >= 0.8. It is preferable to investigate the scree plot in order to choose the number of components and then run again. Default is k=0.
主成分的数目来计算。如果k失踪,或k = 0,算法本身决定的元件数量由找到这样的k,l_k/l_1 >= 10.E-3和Σ_{j=1}^k l_j/Σ_{j=1}^r l_j >= 0.8。这是最好的卵石在选择组件的数量,然后再次运行图进行调查。默认是k=0。
参数:kmax
maximal number of principal components to compute. Default is kmax=10. If k is provided, kmax does not need to be specified, unless k is larger than 10.
最大的主成分个数来计算。默认是kmax=10。如果k提供,kmax不需要被指定,除非k是大于10。
参数:scale
a value indicating whether and how the variables should be scaled. If scale = FALSE (default) or scale = NULL no scaling is performed (a vector of 1s is returned in the scale slot). If scale = TRUE the data are scaled to have unit variance. Alternatively it can be a function like sd or mad or a vector of length equal the number of columns of x. The value is passed to the underlying function and the result returned is stored in the scale slot. Default is scale = FALSE
一个值,该值指示是否以及如何变量应该进行调整。如果scale = FALSE(默认)或scale = NULL不结垢(的向量1 scale插槽中返回的)。如果scale = TRUE的数据缩放到单位方差。另外,它可以是类似的函数sd或mad或向量的长度等于数列的x。该值被传递到底层函数,返回的结果存储在scale插槽。默认是scale = FALSE
参数:trace
whether to print intermediate results. Default is trace = FALSE
是否要打印的中间结果。默认是trace = FALSE
Details
详细信息----------Details----------
PcaGrid, serving as a constructor for objects of class PcaGrid-class is a generic function with "formula" and "default" methods. For details see PCAgrid and the relevant references.
PcaGrid,作为一个构造函数的类的对象PcaGrid-class是一个通用的功能与“公式”和“默认”的方法。有关详细信息,请参阅PCAgrid和相关文献。
值----------Value----------
An S4 object of class PcaGrid-class which is a subclass of the virtual class PcaRobust-class.
S4对象的类PcaGrid-class这是虚拟类PcaRobust-class的一个子类。
(作者)----------Author(s)----------
Valentin Todorov <a href="mailto:valentin.todorov@chello.at">valentin.todorov@chello.at</a>
参考文献----------References----------
Algorithms for Projection-Pursuit Robust Principal Component Analysis, Chemometrics and Intelligent Laboratory Systems, 87, 225.
An Object Oriented Framework for Robust Multivariate Analysis. Journal of Statistical Software, 32(3), 1–47. URL http://www.jstatsoft.org/v32/i03/.
实例----------Examples----------
# multivariate data with outliers[多元数据离群]
library(mvtnorm)
x <- rbind(rmvnorm(200, rep(0, 6), diag(c(5, rep(1,5)))),
rmvnorm( 15, c(0, rep(20, 5)), diag(rep(1, 6))))
# Here we calculate the principal components with PCAgrid[在这里,我们计算的主要组成部分,PCAgrid]
pc <- PcaGrid(x, 6)
# we could draw a biplot too:[我们也可以得出一个双标图:]
biplot(pc)
# we could use another objective function, and [我们可以使用其他目标函数,并]
# maybe only calculate the first three principal components:[也许只是计算的三个主要组成部分:]
pc <- PcaGrid(x, 3, method="qn")
biplot(pc)
# now we want to compare the results with the non-robust principal components[现在我们要比较的结果不健壮的主要组成部分]
pc <- PcaClassic(x)
# again, a biplot for comparision:[再次,双标图对比:]
biplot(pc)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|