predict.classifierOutput(MLInterfaces)
predict.classifierOutput()所属R语言包:MLInterfaces
Predict method for classifierOutput objects
预测classifierOutput对象的方法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function predicts values based on models trained with MLInterfaces' MLearn interface to many machine learning algorithms.
此功能基于MLInterfacesMLearn接口,许多机器学习算法训练的模型预测值。
用法----------Usage----------
## S3 method for class 'classifierOutput'
predict(object, newdata, ...)
参数----------Arguments----------
参数:object
An instance of class classifierOutput.
实例类classifierOutput。
参数:newdata
An object containing the new input data: either a matrix, a data.frame or an ExpressionSet.
一个对象,其中包含新的输入数据:无论是matrix,data.frame或ExpressionSet。
参数:...
Other arguments to be passed to the algorithm-specific predict methods.
其他参数将被传递给特定于算法的预测方法。
Details
详情----------Details----------
This S3 method will extract the ML model from the classifierOutput instance and call either a generic predict method or, if available, a specficly written wrapper to do classes prediction and class probabilities.
此S3方法将提取的ML模型从classifierOutput实例,并呼吁无论是通用的预测方法,如果有的话,1 specficly书面包装做预测类和类概率。
值----------Value----------
Currently, a list with
目前,一个列表
参数:testPredictions
A factor with class predictions.
类预测的一个因素。
参数:testScores
A numeric or matrix with class probabilities.
一个numeric或matrix类的概率。
注意----------Note----------
The function output will most likely be updated in a near future to a classifierOutput (or similar) object.
函数的输出,将最有可能在不久的将来更新classifierOutput(或类似)对象。
作者(S)----------Author(s)----------
Laurent Gatto <lg390@cam.ac.uk>
参见----------See Also----------
MLearn and classifierOutput.
MLearn和classifierOutput。
举例----------Examples----------
set.seed(1234)
data(sample.ExpressionSet)
trainInd <- 1:16
clout.svm <- MLearn(type~., sample.ExpressionSet[100:250,], svmI, trainInd)
predict(clout.svm, sample.ExpressionSet[100:250,-trainInd])
clout.ksvm <- MLearn(type~., sample.ExpressionSet[100:250,], ksvmI, trainInd)
predict(clout.ksvm, sample.ExpressionSet[100:250,-trainInd])
clout.nnet <- MLearn(type~., sample.ExpressionSet[100:250,], nnetI, trainInd, size=3, decay=.01 )
predict(clout.nnet, sample.ExpressionSet[100:250,-trainInd])
clout.knn <- MLearn(type~., sample.ExpressionSet[100:250,], knnI(k=3), trainInd)
predict(clout.knn, sample.ExpressionSet[100:250,-trainInd],k=1)
predict(clout.knn, sample.ExpressionSet[100:250,-trainInd],k=3)
clout.plsda <- MLearn(type~., sample.ExpressionSet[100:250,], plsdaI, trainInd)
predict(clout.plsda, sample.ExpressionSet[100:250,-trainInd])
clout.nb <- MLearn(type~., sample.ExpressionSet[100:250,], naiveBayesI, trainInd)
predict(clout.nb, sample.ExpressionSet[100:250,-trainInd])
clout.rf <- MLearn(type~., sample.ExpressionSet[100:250,], randomForestI, trainInd)
predict(clout.rf, sample.ExpressionSet[100:250,-trainInd])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|