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

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

[复制链接]
发表于 2012-2-26 00:02:37 | 显示全部楼层 |阅读模式
randomiser(made4)
randomiser()所属R语言包:made4

                                        Randomly reassign training and test samples
                                         随机重新分配训练和测试样本

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

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

This function is used to check for bias between a training and test data. It return a new index, which randomly re-assigns samples in the training data to the test dataset and vice versa.
此功能用于检查的训练和测试数据之间的偏差。它返回一个新的指数,随机重新分配样本在训练数据测试数据集,反之亦然。


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


randomiser(ntrain = 77, ntest = 19)



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

参数:ntrain
Numeric. A integer indicating the number of cases in the training dataset  
数字。一个整数,指示的情况下,在训练集


参数:ntest
Numeric. A integer indicating the number of cases in the test dataset  
数字。一个整数,指示的情况下,在测试数据集的数量


Details

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

Produces new indices that can be used for training/test datasets
生产培训/测试数据集,可以使用的新指数


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

It returns a list, containing 2 vectors
它返回一个列表,包含2个向量


参数:train
A vector of length ntrain, which can be used to index a new training dataset
的向量,它可以用来索引一个新的训练集的长度ntrain


参数:test
A vector of length ntest, which can be used to index a new test dataset
一个长度为n测试向量,它可以用来索引一个新的测试数据集


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


Aedin Culhane



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


randomiser(10,5)
train<-matrix(rnorm(400), ncol=20, nrow=20, dimnames=list(1:20,
paste("train",letters[1:20], sep=".")))
test<-matrix(rnorm(200), ncol=10, nrow=20, dimnames=list(1:20,
paste("test",LETTERS[1:10], sep=".")))
all<-cbind(train,test)

colnames(train)
colnames(test)
newInd<-randomiser(ntrain=20, ntest=10)

newtrain<-all[,newInd$train]
newtest<-all[,newInd$test]

colnames(newtrain)
colnames(newtest)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-4 10:00 , Processed in 0.021951 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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