我想优化 ROC 曲线的某个部分,因此在调整过程中只优化部分 AUC。是否在 mlr 包中可用,是否有适合该目标的另一种度量,或者我是否必须创建一个新的度量对象。如果后者是真的,我该怎么办?
以正常 AUC 作为衡量标准的示例:
library(mlr)
Species = sample(c("yes","no"), size=150, replace=T)
data_binom = data.frame(x1=(Species=="yes")+rnorm(150,1,4),
x2=(Species=="no")+rnorm(150,0,9), Species)
learner = makeLearner("classif.rpart", predict.type = "prob")
task = makeClassifTask(data=data_binom, target="Species",
positive="yes")
task = subsetTask(task, subset=sample(1:150, size=100))
param = makeParamSet(makeNumericParam("cp", lower=0.00001, upper=.1))
control = makeTuneControlGrid(resolution=10L)
tuneParams(learner=learner, task=task, resampling=cv10, measures=auc,
par.set=param, control = control)