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

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

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

                                        Partition the study area into rectangular tiles
                                         分区研究区域划分为矩形砖

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

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

partition.tiles divides the study area into a specified number of rectangular tiles. Optionally small partitions can be merged with adjacent tiles to achieve a minimum number or percentage of samples in each tile.
partition.tiles将研究区域划分为指定数量的长方形砖。可以选择小分区可以合并相邻的瓷砖,以达到每瓦的最低数量或比例的样本。


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


  partition.tiles(data, coords = c("x", "y"),
    dsplit = NULL, nsplit = NULL,
    rotation = c("none", "random", "user"), user.rotation,
    offset = c("none", "random", "user"), user.offset,
    reassign = TRUE, min.frac = 0.025, min.n = 5,
    iterate = 1, return.factor = FALSE, repetition = 1,
    seed1 = NULL)



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

参数:coords
vector of length 2 defining the variables in data that contain the x and y coordinates of sample locations
向量,长度为2data包含的x和y坐标的样本的位置定义的变量在


参数:dsplit
optional vector of length 2: equidistance of splits in (possibly rotated) x direction (dsplit[1]) and y direction (dsplit[2]) used to define tiles. If dsplit is of length 1, its value is recycled. Either dsplit or nsplit must be specified.
可选的向量长度为2:等距离的分割(可能旋转)x方向(dsplit[1])和y方向(dsplit[2])用来定义瓷砖。如果dsplit是长度为1,其值被回收。无论是dsplit或nsplit必须指定。


参数:nsplit
optional vector of length 2: number of splits in (possibly rotated) x direction (nsplit[1]) and y direction (nsplit[2]) used to define tiles. If nsplit is of length 1, its value is recycled.
可选的向量长度为2:分割数(可能旋转)x方向(nsplit[1])和y方向(nsplit[2])用来定义瓷砖。如果nsplit是长度为1,其值被回收。


参数:rotation
indicates whether and how the rectangular grid should be rotated; random rotation is only between -45 and +45 degrees
是否以及如何表示的矩形网格应该是旋转; -45和+45度之间随意旋转


参数:user.rotation
if rotation="user", angles (in degrees) by which the rectangular grid is to be rotated in each repetition. Either a vector of same length as repetition, or a single number that will be replicated length(repetition) times.
如果rotation="user",角度(单位:度),由该矩形网格是在每个重复旋转。无论是相同的长度的矢量作为repetition,或一个单一的数字将被复制length(repetition)倍。


参数:offset
indicates whether and how the rectangular grid should be shifted by an offset
是否以及如何表示的矩形网格应转向的偏移


参数:user.offset
if offset="user", a list (or vector) of two components specifying a shift of the rectangular grid in (possibly rotated) x and y direction. The offset values are relative values, a value of 0.5 resulting in a one-half tile shift towards the left, or upward. If this is a list, its first (second) component refers to the rotated x (y) direction, and both components must have same length as repetition (or length 1). If a vector of length 2 (or list components have length 1), the two values will be interpreted as relative shifts in (rotated) x and y direction, respectively, and will therefore be recycled as needed (length(repetition) times each).
如果offset="user",指定的移位(可能是旋转)的矩形网格,在x和y方向的两个分量的一个列表(或向量)。的偏移量的值是相对值,一个值0.5导致在一个半瓷砖转向左侧,或向上。如果这是一个列表,它的第一(第二)的成分是指旋转的×(y)方向,这两个组件repetition(或长度1)必须具有相同的长度。如果一个矢量的长度为2(或列表组件具有长度为1),这两个值将被解释为相对移位(旋转)中的x和y方向,分别,因此,将被回收作为需要(length(repetition)次,每次)。


参数:reassign
logical (default TRUE): if TRUE, 'small' tiles (as per min.frac and min.n arguments and get.small.tiles) are merged with (smallest) adjacent tiles. If FALSE, small tiles are 'eliminated', i.e. set to NA.
逻辑(默认TRUE):如果TRUE,小砖(每min.frac和min.n参数和get.small.tiles)合并(最小)相邻瓷砖。如果FALSE,小砖被“淘汰”,即设置为NA。


参数:min.frac
numeric >=0, <1: minimum relative size of partition as percentage of sample; argument passed to get.small.tiles. Will be ignored if NULL.
数字> = 0,<1:最小相对的分区大小的样品的百分比;参数传递给get.small.tiles。将被忽略NULL。


参数:min.n
integer >=0: minimum number of samples per partition; argument passed to get.small.tiles. Will be ignored if NULL.
整数> = 0:最低数量的样本,每个分区的参数传递给get.small.tiles。将被忽略NULL。


参数:iterate
argument to be passed to tile.neighbors



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


参数:return.factor
if FALSE (default), return a represampling object; if TRUE (used internally by other sperrorest functions), return a list containing factor vectors (see Value)
如果FALSE(默认),返回一个represampling对象,如果TRUE(内部使用其他sperrorest功能的),返回一个list因子矢量(见值)


参数: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)采样前的数据初始化随机数生成器设置。


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

A represampling object. Contains length(repetition) resampling objects as repetitions. The exact number of folds / test-set tiles within each resampling objects depends on the spatial configuration of the data set and possible cleaning steps
Arepresampling对象。包含length(repetition)resampling的对象作为重复的。倍数/测试集瓷砖每个resampling对象内的确切的数目依赖于数据集和可能的清洗步骤的空间结构的


注意----------Note----------

Default parameter settings may change in future releases. This function, especially the rotation and shifting part of it and the algorithm for cleaning up small tiles is still a bit experimental. Use with caution. For non-zero offsets (offset!="none")), the number of tiles may actually be greater than nsplit[1]*nsplit[2] because of fractional tiles lurking into the study region. reassign=TRUE with suitable thresholds is therefore recommended for non-zero (including random) offsets.
在将来的版本中,默认的参数设置可能会改变。此功能,尤其是旋转和移动的一部分,它和清理小瓷砖的算法仍然是一个有点实验性的。请谨慎使用。对于非零偏移量(offset!="none")),瓷砖的数量实际上可能大于nsplit[1]*nsplit[2]因为分数砖潜伏到研究区域。 reassign=TRUE因此,建议用合适的阈值为非零(包括随机)偏移。


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

sperrorest, as.resampling.factor, get.small.tiles, tile.neighbors
sperrorest,as.resampling.factor,get.small.tiles,tile.neighbors


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


data(ecuador)
parti = partition.tiles(ecuador, nsplit = c(4,3), reassign = FALSE)
plot(parti,ecuador)
summary(parti) # tile A4 has only 55 samples[瓷砖A4只有55个样本]
# same partitioning, but now merge tiles with less than 100 samples to adjacent tiles:[相同的分区,但现在少于100个样品,相邻的瓷砖瓷砖合并:]
parti2 = partition.tiles(ecuador, nsplit = c(4,3), reassign = TRUE, min.n = 100)
plot(parti2,ecuador)
summary(parti2)
# tile B4 (in 'parti') was smaller than A3, therefore A4 was merged with B4, not with A3[瓷砖B4(在“分区”)是小于A3,因此A4与B4合并,而不是A3]
# now with random rotation and offset, and tiles of 2000 m length:[现在随机旋转和偏移量,和2000米长的砖:]
parti3 = partition.tiles(ecuador, dsplit = 2000, offset = "random", rotation = "random", reassign = TRUE, min.n = 100)
plot(parti3,ecuador)
summary(parti3)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 20:34 , Processed in 0.022079 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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