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

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

[复制链接]
发表于 2012-10-1 12:59:01 | 显示全部楼层 |阅读模式
predefinedObjectiveFunctions(TunePareto)
predefinedObjectiveFunctions()所属R语言包:TunePareto

                                         Predefined objective functions for parameter tuning
                                         预定义的目标函数参数整定

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

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

Predefined objective functions that calculate the classification error, the sensitivity or the specificity of reclassification or cross-validation experiments.
预定义的目标函数计算的分类误差,灵敏度或特异性重新分类或交叉验证实验。


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


reclassError()
reclassWeightedError()
reclassSensitivity(caseClass)
reclassSpecificity(caseClass)
reclassConfusion(trueClass, predictedClass)
cvError(nfold = 10, ntimes = 10,
        leaveOneOut = FALSE, stratified=FALSE,
        foldList=NULL)
cvErrorVariance(nfold = 10, ntimes = 10,
                leaveOneOut = FALSE, stratified=FALSE,
                foldList=NULL)
cvWeightedError(nfold = 10, ntimes = 10,
                leaveOneOut = FALSE, stratified=FALSE,
                foldList=NULL)
cvSensitivity(nfold = 10, ntimes = 10,
              leaveOneOut = FALSE, stratified=FALSE,
              foldList=NULL, caseClass)
cvSpecificity(nfold = 10, ntimes = 10,
              leaveOneOut = FALSE, stratified=FALSE,
              foldList=NULL, caseClass)
cvConfusion(nfold = 10, ntimes = 10,
            leaveOneOut = FALSE, stratified=FALSE,
            foldList=NULL, trueClass, predictedClass)



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

参数:nfold
The number of groups of the cross-validation. Ignored if leaveOneOut=TRUE.  
交叉验证的基团的数目。如果忽略leaveOneOut=TRUE。


参数:ntimes
The number of repeated runs of the cross-validation.  
交叉验证的反复运行的数目。


参数:leaveOneOut
If this is true, a leave-one-out cross-validation is performed, i.e. each sample is left out once in the training phase and used as a test sample  
如果这是真的,离开一个进行交叉验证,即每个样品离开了曾经在训练阶段和使用作为测试样本


参数:stratified
If set to true, a stratified cross-validation is carried out. That is, the percentage of samples from different classes in the cross-validation folds corresponds to the class sizes in the complete data set. If set to false, the folds may be unbalanced.  
如果设置为true,进行分层交叉验证。即是,从不同的类中的交叉验证褶皱的样品的百分比对应于在完整的数据集的类的大小。如果设置为false,则可能是不平衡的褶皱。


参数:foldList
If this parameter is set, the other cross-validation parameters (ntimes, nfold, leaveOneOut, stratified) are ignored. Instead, the precalculated cross-validation partition supplied in foldList is used. This allows for using the same cross-validation experiment in multiple tunePareto calls. Partitions can be generated using generateCVRuns.  
如果此参数设置,其他交叉验证参数(ntimes,nfold,leaveOneOut,stratified)将被忽略。相反,使用预先计算的交叉验证分区提供foldList。这允许在多个tunePareto呼叫使用相同的交叉验证实验。分区可以生成使用generateCVRuns。


参数:caseClass
The class containing the positive samples for the calculation of specificity and sensitivity. All samples with different class labels are regarded as controls (negative samples).
含有的类的特异性和灵敏度的计算的阳性样品。所有样品的不同类的标签,被视为对照组(阴性样品)。


参数:trueClass
When calculating the confusion of two classes, the class to which a sample truly belongs.  
在计算混淆的两个类,这个类的一个样品真正的归属。


参数:predictedClass
When calculating the confusion of two classes, the class to which a sample is erreneously assigned.  
当计算两个类,类的样品erreneously分配的混乱。


Details

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

The functions do not calculate the objectives, but return a structure of class TuneParetoObjectives that provides all information on the objective function for later use in tunePareto.
的功能并不计算的目标,但返回的结构类TuneParetoObjectives,它提供的所有信息对目标函数在tunePareto以备后用。

The behaviour of the functions in tunePareto is as follows:
行为的功能在tunePareto如下:

The reclassification functions train the classifiers with the full data set. Afterwards, the classifiers are applied to the same data set. reclassError measures the fraction of misclassified samples, reclassWeightedError calculates the sum of fractions of misclassified samples in each class weighted by the class size. reclassSensitivity measures the sensitivity, and reclassSpecificity measures the specificity of the reclassification experiment. reclassConfusion calculates the fraction of samples in trueClass that have been confused with predictedClass. reclassError, reclassWeightedError and reclassConfusion are minimization objectives, whereas reclassSensitivity and reclassSpecificity are maximization objectives.
重新分类功能完整的数据集的分类与培训。之后,分类器被施加到相同的数据集。 reclassError测量部分的错误分类样本,reclassWeightedError每班的学生人数在每类加权计算的错误分类样本的分数的总和。 reclassSensitivity测量的灵敏度,和reclassSpecificity重新分类实验测量的特殊性。 reclassConfusion计算分数的样本trueClass已被混淆predictedClass。 reclassError,reclassWeightedError和reclassConfusion是最小化的目标,而reclassSensitivity和reclassSpecificity是最大化的目标。

The cross-validation functions partition the samples in the data set into a number of groups (depending on nfold and leaveOneOut). Each of these groups is left out once in the training phase and used for prediction. The whole procedure is usually repeated several times (as specified in ntimes), and the results are averaged. Similar to the reclassification functions, cvError calculates the average fraction of misclassified samples over the runs, and cvWeightedError calculates the mean sum of fractions of misclassified samples in each class weighted by the class size. cvErrorVariance calculates the variance of the cross-validation error. cvSensitivity calculates the average sensitivity and cvSpecificity calculates the average specificity. cvConfusion calculates the average fraction of samples in trueClass that have been confused with predictedClass. cvError, cvWeightedError, cvErrorVariance and cvConfusion are minimization objectives, and cvSensitivity and cvSpecificity are maximization objectives.
交叉验证功能分区的样本中的数据设置成若干组(根据nfold和leaveOneOut)。这些基团中的每一个离开一次在训练阶段,用于预测。整个过程是通常重复几次(如指定在ntimes),并且结果被平均。重新分类功能相似,cvError在运行计算平均分数的错误分类样本,并cvWeightedError计算平均值的错误分类样本,每类加权每班的学生人数总和的分数。 cvErrorVariance计算的交叉验证错误的方差。 cvSensitivity计算的平均灵敏度和cvSpecificity计算的平均特异性。 cvConfusion计算平均分数的样本trueClass已被混淆predictedClass。 cvError,cvWeightedError,cvErrorVariance和cvConfusion是最小化目标,和cvSensitivity和cvSpecificity是最大化的目标。


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

An object of class TuneParetoObjective representing the objective function. For more details, see createObjective.
对象的类TuneParetoObjective的目标函数。有关详细信息,请参阅createObjective。


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

createObjective, tunePareto, generateCVRuns
createObjective,tunePareto,generateCVRuns


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



# build a list of objective functions[建立一个目标函数列表]
objectiveFunctions <- list(cvError(10, 10),
                           reclassSpecificity(caseClass="setosa"),
                           reclassSensitivity(caseClass="setosa"))

# pass them to tunePareto[通过他们tunePareto]
print(tunePareto(data = iris[, -ncol(iris)],
                 labels = iris[, ncol(iris)],
                 classifier = tunePareto.knn(),
                 k = c(3,5,7,9),
                 objectiveFunctions = objectiveFunctions))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 20:39 , Processed in 0.036906 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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