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

R语言 sperrorest包 represampling.factor.bootstrap()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 15:04:11 | 显示全部楼层 |阅读模式
represampling.factor.bootstrap(sperrorest)
represampling.factor.bootstrap()所属R语言包:sperrorest

                                        Bootstrap at an aggregated level
                                         引导的总体水平

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

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

represampling.factor.bootstrap resamples partitions defined by a factor variable. This can be used for non-overlapping block bootstraps and similar.
represampling.factor.bootstrap重新采样分区定义的一个因素变量。这可以用于非重叠块引导和类似。


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


  represampling.factor.bootstrap(data, fac, repetition = 1,
    nboot = -1, seed1 = NULL, oob = FALSE)



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

参数:fac
defines a grouping or partitioning of the samples in data; three possible types: (1) the name of a variable in data (coerced to factor if not already a factor variable); (2) a factor variable (or a vector that can be coerced to factor); (4) a list of factor variables (or vectors that can be coerced to factor); this list must be of length length(repetition), and if it is named, the names must be equal to as.character(repetition); this list will typically be generated by a partition.* function with return.factor=TRUE (see Examples below)
定义了一组或分区的样品中data;三种可能的类型:(1)名称中的变量data(强制因素,如果不已经是一个因素变量),(2)的一个因素变量(或一个向量,可以强制转换为因素);(4)因子变量(或向量,可以强制转换为因素)的列表,这个列表必须是长度length(repetition),如果它被命名为,的名称必须等于as.character(repetition),这个列表通常会产生一个partition.*功能return.factor=TRUE(见下面的例子)


参数:nboot
number of bootstrap replications used for generating the bootstrap training sample (nboot[1]) and the test sample (nboot[2]); nboot[2] is ignored (with a warning) if oob=TRUE. A value of -1 will be substituted with the number of levels of the factor variable, corresponding to an n out of n bootstrap at the grouping level defined by fac.
生成的引导训练样本(nboot[1])和测试样品(用于自举的复制数目nboot[2]);nboot[2]被忽略(警告),如果oob=TRUE。 -1值将被替换的数量水平的因素变量,对应一个n的n引导分组级别定义的fac。


参数:oob
if TRUE, the test sample will be the out-of-bag sample; if FALSE (default), the test sample is an independently drawn bootstrap sample of size nboot[2]
如果TRUE,测试样品将样品袋; FALSE如果(默认),测试样品是一个独立制定引导样本的大小nboot[2]


参数:data
data.frame containing at least the columns specified by coords
data.frame的至少包含列指定的coords


参数:repetition
numeric vector: cross-validation repetitions to be generated. Note that this is not the number of repetitions, but the indices of these repetitions. E.g., use repetition=c(1:100) to obtain (the 'first') 100 repetitions, and repetition=c(101:200) to obtain a different set of 100 repetitions.
数字向量:交叉验证的重复产生。注意,这是不重复的次数,但这些重复的指数。例如,使用repetition=c(1:100)(“第一个”)取得100个重复,和repetition=c(101:200)获得一组不同的重复100次。


参数:seed1
seed1+i is the random seed that will be used by set.seed in repetition i (i in repetition) to initialize the random number generator before sampling from the data set.
seed1+i是随机的种子,将用于set.seed重复i(irepetition)采样前的数据初始化随机数生成器设置。


Details

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

nboot refers to the number of groups (as defined by the factors) to be drawn with replacement from the set of groups. I.e., if fac is a factor variable, nboot would normally not be greater than nlevels(fac), nlevels(fac) being the default as per nboot=-1.
nboot是指到的组的数目(如定义的因素)来绘制从该组的组的更换。也就是说,如果fac是一个因素变量,nboot会通常不大于nlevels(fac),nlevels(fac)默认情况下,每nboot=-1的。


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

represampling.disc.bootstrap, represampling.tile.bootstrap, note yet implemented: partition.cv.factor
represampling.disc.bootstrap,represampling.tile.bootstrap,尚未实施:partition.cv.factor


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


data(ecuador)
# a dummy example for demonstration, performing bootstrap[一个虚拟的例子作示范,进行引导]
# at the level of an arbitrary factor variable:[在水平的任意因子变量:]
parti = represampling.factor.bootstrap(ecuador, factor(floor(ecuador$dem/100)), oob=TRUE)
plot(parti,ecuador)
# using the factor bootstrap for a non-overlapping block bootstrap[使用因子自举一个非重叠的块自举]
# (see also represampling.tile.bootstrap):[(见represampling.tile.bootstrap):]
fac = partition.tiles(ecuador, return.factor=TRUE, repetition=c(1:3), dsplit=500, min.n=200, rotation="random", offset="random")
parti = represampling.factor.bootstrap(ecuador, fac, oob=TRUE, repetition=c(1:3))
plot(parti,ecuador)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 20:32 , Processed in 0.023378 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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