tpam.cv(TPAM)
tpam.cv()所属R语言包:TPAM
Cross-validation
交叉验证
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function uses a form of cross-validation to estimate the optimal feature threshold.
此功能使用某种形式的交叉验证估计最优的特征阈值。
用法----------Usage----------
tpam.cv(fit, data, nfold = NULL, folds = NULL)
参数----------Arguments----------
参数:fit
The result of a call to tpam.train
的呼叫的结果tpam.train
参数:data
Data object of form described in tpam.train documentation
在tpam.train文档的形式描述的数据对象
参数:nfold
Number of cross-validation folds
交叉验证的褶皱数目
参数:folds
Lists of indices of cross-validation folds (optional)
指数的交叉验证倍数列表(可选)
值----------Value----------
list(threshold=threshold, error=error, loglik=loglik,size=size, yhat=yhat,y=y,prob=prob,folds=folds, cv.objects=cv.objects, call = this.call)
列表(阈值=阈值,错误错误,loglik = loglik,大小=大小,yhat = yhat,Y = Y,概率= PROB,层层叠叠的褶皱,cv.objects = cv.objects,调用= this.call),
参数:thresholds
Vector of thresholds considered
矢量考虑的阈值
参数:error
The number of cross-validation errors for each threshold value
每个阈值的交叉验证错误
参数:loglik
The cross-validated multinomial log-likelihood value for each threshold value
交叉验证的多项每个阈值的对数似然值
参数:size
A vector of the number of genes that survived the thresholding, for each threshold value tried.
幸存的阈值,为每个阈值的数目的基因的向量的尝试。
参数:yhat
A matrix of size n by nthreshold, containing the cross-validated class predictions for each threshold value, in each column.
矩阵的大小为n nthreshold,包含交叉验证类的每个阈值的预测,每列中。
参数:y
A vector of true class labels.
真正的类标签的矢量。
参数:prob
A matrix of size n by nthreshold, containing the cross-validated probabilities of class predictions for each threshold value, in each column.
A矩阵的大小为n通过nthreshold,含有,在每列中的交叉验证的每个阈值的类的预测概率。
参数:folds
The cross-validation folds used
交叉验证褶皱
参数:cv.objects
Train objects, from each of the CV folds
火车的对象,从每个的CV褶皱
参数:call
The calling sequence used
使用的调用序列
(作者)----------Author(s)----------
Yuping Zhang
实例----------Examples----------
x = list()
for(i in 1:2){
set.seed(i+123)
x[[i]] = matrix(rnorm(500*100), ncol=100)
}
y = factor(sample(c(1:2), size=100, replace=TRUE))
data = list(x = x, y=y, genenames = as.character(paste("gene", c(1:500), sep="")), geneid = as.character(paste("gene", c(1:500), sep="")))
x = list()
for(i in 1:2){
set.seed(i+133)
x[[i]] = matrix(rnorm(500*100), ncol=100)
}
y = factor(sample(c(1:2), size=100, replace=TRUE))
data.test = list(x = x, y=y, genenames = as.character(paste("gene", c(1:500), sep="")), geneid = as.character(paste("gene", c(1:500), sep="")))
obj = tpam.train(data, data.test)
cv.obj = tpam.cv(obj$fit, data=data, nfold=2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|