找回密码
 注册
查看: 344|回复: 0

R语言 rrcov包 LdaPP()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-28 20:47:02 | 显示全部楼层 |阅读模式
LdaPP(rrcov)
LdaPP()所属R语言包:rrcov

                                         Robust Linear Discriminant Analysis by Projection Pursuit
                                         鲁棒线性判别分析的投影寻踪

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Performs robust linear discriminant analysis by the projection-pursuit approach - proposed by Pires and Branco (2010) - and returns the results as an object of class LdaPP (aka constructor).
执行稳健的线性判别分析的投影追求的方式 - 建议由皮雷和布兰科(2010) - 返回的结果为对象的类LdaPP(又名构造函数)。


用法----------Usage----------


LdaPP(x, ...)
## S3 method for class 'formula'[类formula的方法]
LdaPP(formula, data, subset, na.action, ...)
## Default S3 method:[默认方法]
LdaPP(x, grouping, prior = proportions, tol = 1.0e-4,
                 method = c("huber", "mad", "sest", "class"),
                 optim = FALSE,
                 trace=FALSE, ...)



参数----------Arguments----------

参数:formula
a formula of the form y~x, it describes the response and the predictors. The formula can be more complicated, such as y~log(x)+z etc (see formula for more details). The response should be a factor representing the response variable, or any vector that can be coerced to such (such as a logical variable).
一个公式的形式y~x的,它描述了响应的预测。计算公式可以更复杂,如y~log(x)+z等(见formula更多的细节)。的反应应该是一个因素代表响应变量,或任何向量,可以强制转换为例如(如一个逻辑变量)。


参数: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。


参数:x
a matrix or data frame containing the explanatory variables (training set).  
矩阵或数据框包含的解释变量(训练集)。


参数:grouping
grouping variable:  a factor specifying the class for each observation.
分组变量:指定一个类为每个观测的一个因素。


参数:prior
prior probabilities, default to the class proportions for the training set.
先验概率,默认为类的训练集的比例。


参数:tol
tolerance
公差


参数:method
method
方法


参数:optim
wheather to perform the approximation using the Nelder and Mead simplex method (see function optim() from package stats). Default is optim = FALSE
wheather进行近似使用内尔德和Mead单纯形法(见函数optim()包stats“)。默认是optim = FALSE


参数:trace
whether to print intermediate results. Default is trace = FALSE.
是否要打印的中间结果。默认是trace = FALSE。


参数:...
arguments passed to or from other methods.
传递的参数或其他方法。


Details

详细信息----------Details----------

Currently the algorithm is implemented only for binary classification and in the following will be assumed that only two groups are present.
目前的算法实现只对二进制的分类,并且在下面将假设只有两个基团是本。

The PP algorithm searches for low-dimensional projections of higher-dimensional data where a projection index is maximized. Similar to the original Fisher's proposal the squared standardized distance between the observations in the two groups is maximized. Instead of the sample univariate mean and standard deviation (T,S) robust alternatives are used. These are selected through the argument method and can be one of
的的PP算法,搜索低维的高维数据投影指数最大化的预测。原始Fisher的建议相似观测在两组之间的距离的平方标准化最大化。代替样品单变量的平均值和标准偏差(T,S)鲁棒替代品使用。这些都是通过参数method可以是一个




huber the pair (T,S) are the robust M-estimates of location and scale
HUBER对(T,S)是强劲的M-估计的地点和规模




mad (T,S) are the Median and the Median Absolute Deviation
狂(T,S)中位数和中位数绝对偏差




sest the pair (T,S) are the robust S-estimates of location and scale
SEST对(T,S)是强劲的S-估计的地点和规模




class (T,S) are the mean and the standard deviation.
类(T,S)是的均值和标准差。

The first approximation A1 to the solution is obtained by investigating a finite number of candidate directions, the unit vectors defined by all pairs of points such that one belongs to the first group and the other to the second group. The found solution is stored in the slots raw.ldf and raw.ldfconst.
通过以下方式获得有限数量的候选方向的单位矢量定义的点,使得一个属于第一组和第二组的其他所有对调查A1到该溶液中的第一近似值。找到的解决方案被存储在槽raw.ldf和raw.ldfconst。

The second approximation A2 (optional) is performed by a numerical optimization algorithm using A1 as initial solution. The Nelder and Mead method implemented in the function optim is applied. Whether this refinement will be used is controlled by the argument optim. If optim=TRUE the result of the optimization is stored into the slots ldf and ldfconst. Otherwise these slots are set equal to raw.ldf and raw.ldfconst.
第二个近似A2(可选)的数值优化算法,使用A1作为初步的解决方案。内尔德和米德方法中的功能optim实现应用。这是否将被用于细化控制参数optim。如果optim=TRUE:的优化的结果被存储到槽ldf和ldfconst。否则,这些插槽被设置等于raw.ldf和raw.ldfconst。


值----------Value----------

Returns an S4 object of class LdaPP-class
返回S4对象的类LdaPP-class


警告----------Warning ----------

Still an experimental version! Only binary classification is supported.
仍然是一个实验版本!只有二进制分类的支持。


(作者)----------Author(s)----------


Valentin Todorov <a href="mailto:valentin.todorov@chello.at">valentin.todorov@chello.at</a> and
Ana Pires <a href="mailto:apires@math.ist.utl.pt">apires@math.ist.utl.pt</a>




参考文献----------References----------

Projection-pursuit approach to robust linear discriminant analysis Journal Multivariate Analysis, Academic Press, Inc., 101, 2464&ndash;2485.

参见----------See Also----------

Linda, LdaClassic
Linda,LdaClassic


实例----------Examples----------



##[#]
## Function to plot a LDA separation line[#函数来绘制一个LDA分割线]
##[#]
lda.line <- function(lda, ...)
{
    ab <- lda@ldf[1,] - lda@ldf[2,]
    cc <- lda@ldfconst[1] - lda@ldfconst[2]
    abline(a=-cc/ab[2], b=-ab[1]/ab[2],...)
}

data(pottery)
x <- pottery[,c("MG", "CA")]
grp <- pottery$origin
col <- c(3,4)
gcol <- ifelse(grp == "Attic", col[1], col[2])
gpch <- ifelse(grp == "Attic", 16, 1)

##[#]
## Reproduce Fig. 2. from Pires and branco (2010)[#重现图。 2。由皮雷和布兰科(2010年)]
##[#]
require(ellipse)
plot(CA~MG, data=pottery, col=gcol, pch=gpch)

ppc <- LdaPP(x, grp, method="class", optim=TRUE)
lda.line(ppc, col=1, lwd=2, lty=1)

pph <- LdaPP(x, grp, method="huber",optim=TRUE)
lda.line(pph, col=3, lty=3)

pps <- LdaPP(x, grp, method="sest", optim=TRUE)
lda.line(pps, col=4, lty=4)

ppm <- LdaPP(x, grp, method="mad", optim=TRUE)
lda.line(ppm, col=5, lty=5)

rlda <- Linda(x, grp, method="mcd")
lda.line(rlda, col=6, lty=1)

fsa <- Linda(x, grp, method="fsa")
lda.line(fsa, col=8, lty=6)

## Use the formula interface:[使用公式接口:]
##[#]
LdaPP(origin~MG+CA, data=pottery)       ## use the same two predictors[#使用相同的两个预测]
LdaPP(origin~., data=pottery)           ## use all predictor variables[#使用所有预测变量。]

##[#]
## Predict method[#预测方法]
data(pottery)
fit <- LdaPP(origin~., data = pottery)
predict(fit)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-26 23:32 , Processed in 0.041088 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表