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

R语言 sperrorest包 as.resampling()函数中文帮助文档(中英文对照)

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

                                        Resampling objects such as partitionings or bootstrap samples
                                         重采样对象,如分割或bootstrap样本

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

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

Create/coerce and print resampling objects, e.g., partitionings or boostrap samples derived from a data set.
创建/胁迫和打印重采样对象,例如,来自一个数据集的样本分割或自举。


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


  as.resampling(object, ...)

  ## Default S3 method:
as.resampling(object, ...)

  ## S3 method for class 'factor'
as.resampling(object, ...)

  ## S3 method for class 'list'
as.resampling(object, ...)

  validate.resampling(object)

  is.resampling(x, ...)

  ## S3 method for class 'resampling'
print(x, ...)



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

参数:object
depending on the function/method, a list or a vector of type factor defining a partitioning of the dataset
根据函数/方法,一个列表或一个矢量类型的因子,定义一个分区的数据集


参数:x
object of class resampling
对象的类resampling


参数:...
currently not used
目前未使用


Details

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

A resampling object is a list of lists defining a set of training and test samples.
Aresampling对象的列表,列表定义一组的训练和测试样本。

In the case of k-fold cross-validation partitioning, for example, the corresponding resampling object would be of length k, i.e. contain k lists. Each of these k lists defines a training set of size n(k-1)/k (where n is the overall sample size), and a test set of size n/k. The resampling object does, however, not contain the data itself, but only indices between 1 and n identifying the seleciton (see Examples).
在k倍交叉验证分区的情况下,例如,相应的resampling对象将k,即包含k列表的长度。这些k列表定义了一个训练集的大小n(k-1)/k(其中n是总体样本的大小),和测试集的大小n/k。然而,resampling对象,不包含数据本身,但只指数之间1和n确定的seleciton的(见例)。

Another example is bootstrap resampling. represampling.bootstrap with argument oob=TRUE generates [rep]resampling objects with indices of a bootstrap sample in the train component and indices of the out-of-bag sample in the test component (see Examples below).
另一个例子是举的重采样。 represampling.bootstrap参数oob=TRUE产生[rep]resampling对象的引导样品在train袋样品的成分和指标与指数在测试组件(见下面的例子)。

as.resampling.factor: For each factor level of the input variable, as.resampling.factor determines the indices of samples in this level (= test samples) and outside this level (= training samples). Empty levels of object are dropped without warning.
as.resampling.factor:对于每个输入变量的因子水平,as.resampling.factor确定样本的指数,其中此级别中(=试验样品)和外部这个水平(=训练样本)。空object不发出警告的情况下被丢弃。

as.resampling.list checks if the list in object has a valid resampling object structure (with components train and test etc.) and assigns the class attribute "resampling" if successful.
as.resampling.list检查,如果列表中object有效的resampling对象结构(的组件train和test等),并指定类的属性<X >如果成功的话。


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

as.resampling methods: An object of class resampling.
as.resampling方法:对象的类resampling。


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

represampling, partition.cv, partition.kmeans, represampling.bootstrap, etc.
represampling,partition.cv,partition.kmeans,represampling.bootstrap,等等。


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


data(ecuador) # Muenchow et al. (2012), see ?ecuador[明肖等。 (2012年),厄瓜多尔,看到了吗?]

# Partitioning by elevation classes in 200 m steps:[分区海拔班,200 m步:]
parti = factor( as.character( floor( ecuador$dem / 200 ) ) )
smp = as.resampling(parti)
summary(smp)
# Compare:[比较:]
summary(parti)

# k-fold (non-spatial) cross-validation partitioning:[K-折(非空间)交叉验证分区:]
parti = partition.cv(ecuador)
parti = parti[[1]] # the first (and only) resampling object in parti[在分区的第一个(也是唯一的)重采样对象]
# data corresponding to the test sample of the first fold:[第一倍数的试样相对应的数据:]
str( ecuador[ parti[[1]]$test , ] )
# the corresponding training sample - larger:[相应的训练样本 - 更大:]
str( ecuador[ parti[[1]]$train , ] )

# Bootstrap training sets, out-of-bag test sets:[的引导训练集,袋试验台:]
parti = represampling.bootstrap(ecuador, oob = TRUE)
parti = parti[[1]] # the first (and only) resampling object in parti[在分区的第一个(也是唯一的)重采样对象]
# out-of-bag test sample: approx. one-third of nrow(ecuador):[袋测试样品:约。三分之一的NROW(厄瓜多尔):]
str( ecuador[ parti[[1]]$test , ] )
# bootstrap training sample: same size as nrow(ecuador):[的引导训练样本:大小相同NROW(厄瓜多尔):]
str( ecuador[ parti[[1]]$train , ] )

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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