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

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

[复制链接]
发表于 2012-2-26 01:05:17 | 显示全部楼层 |阅读模式
xvalSpec(MLInterfaces)
xvalSpec()所属R语言包:MLInterfaces

                                        container for information specifying a cross-validated
                                         指定交叉验证的集装箱信息

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

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

container for information specifying a cross-validated
指定交叉验证的集装箱信息


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


xvalSpec( type, niter=0, partitionFunc=function(data, classLab, iternum ) {
                                (1:nrow(data))[-iternum] },
                         fsFun = function(formula, data) formula )



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

参数:type
a string, "LOO" indicating leave-one-out cross-validation, or "LOG" indicating leave-out-group, or "NOTEST", indicating the entire dataset is used in a single training run.
一个字符串,“弃一”表示假一出交叉验证,或“log”,表示留出组,或“NOTEST”,说明整个数据集运行在一个单一的培训。


参数:niter
numeric specification of the number of cross-validation iterations to use.  Ignored if type is "LOO".
数字交叉验证迭代使用规范。如果type是"LOO"忽略。


参数:partitionFunc
function, with parameters data (bound to data.frame), clab (bound to character string), iternum (bound to numeric index into sequence of 1:niter).  This function's job is to provide the indices of training cases for each cross-validation step.  An example is balKfold.xvspec, which computes a series of indices that are approximately balanced with respect to frequency of outcome types.
函数参数的数据绑定到数据框,CLAB(势必字符串),iternum(1顺序装订成数字索引:niter)。这个函数的工作是提供培训的情况下,指数为每个交叉验证步骤。一个例子是的balKfold.xvspec,计算结果类型的频率,大约是平衡的一系列指标。


参数:fsFun
function, with parameters formula, data.  The function must return a formula suitable for defining a model on the basis of the main input data.  A candidate fsFun  is given in example for fsHistory function.
功能,参数,公式,数据。函数必须返回一个适合的主要输入数据的基础上定义一个模型的公式。一个的候选人fsFun例如在为fsHistory功能。


Details

详情----------Details----------

If type == "LOO", no other parameters are inspected. If type == "LOG" a value for partitionFunc must be supplied.  We recommend using balKfold.xvspec(K).  The values of niter and K in this usage must be the same. This redundancy will be removed in a future upgrade.
如果type == "LOO",没有其他参数视察。如果必须提供type == "LOG"partitionFunc价值。我们建议使用balKfold.xvspec(K)。 niter和K在这种用法必须是相同的价值观。这将在未来的升级中删除冗余。

If the multicore package is attached, cross-validation will be distributed to cores using mclapply.
如果multicore包安装后,将分配给内核使用mclapply交叉验证。


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

An instance of classifierOutput, with a special structure.  The RObject return slot is populated with a list of niter cross-validation results.  Each element of this list is itself a list with two elements: test.idx (the indices of the test set for the associated cross-validation  iteration, and mlans, the classifierOutput generated at each iteration.  Thus there are classifierOutput instances nested within the main classifierOutput returned when a xvalSpec is used.
classifierOutput,具有特殊结构的实例。 RObject返回槽填充与niter交叉验证的结果列表。此列表中的每个元素本身是一个有两个元素的列表:test.idx(指数相关的交叉验证迭代测试,mlans,classifierOutput每次迭代产生因此有classifierOutput嵌套实例主要classifierOutput时xvalSpec用于返回。


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


Vince Carey <stvjc@channing.harvard.edu>



举例----------Examples----------


data(crabs)
set.seed(1234)
#[]
# demonstrate cross validation[演示了交叉验证]
#[]
nn1cv = MLearn(sp~CW+RW, data=crabs, nnetI, xvalSpec("LOG",
   5, balKfold.xvspec(5)), size=3, decay=.01 )
nn1cv
confuMat(nn1cv)
names(RObject(nn1cv)[[1]])
RObject(RObject(nn1cv)[[1]]$mlans)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-3 07:06 , Processed in 0.025943 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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