[英]mlr equivalent of carets model selectionFunction in R
The caret library in R has a hyper-parameter 'selectionFunction' inside trainControl(). R 中的插入符号库在 trainControl() 中有一个超参数“selectionFunction”。 It's used to prevent over-fitting models using Breiman's one standard error rule, or tolerance, etc.
它用于使用 Breiman 的一种标准误差规则或容差等来防止过度拟合模型。
Does mlr have an equivalent? mlr 有等价物吗? If so, which function is it within?
如果是,它在哪个功能内?
mlr only allows to choose optimal hyperparameters by optimizing certain measures/metrics. mlr只允许通过优化某些度量/指标来选择最佳超参数。
However, essentially each "measure" in mlr is just a function that specifies how a certain performance is handled.但是,基本上mlr 中的每个“度量”只是一个函数,用于指定如何处理某个性能。 You can try to write your own custom measure as outlined in this vignette .
您可以尝试编写自己的自定义度量,如 本小插图中所述。
Other than that, it might be worth opening this as a feature request in the new mlr3 framework, specifically in mlr3measures , since mlr itself is deprecated.除此之外,可能值得在新的mlr3框架中将其作为功能请求打开,特别是在mlr3measures 中,因为mlr本身已被弃用。
Posting an answer to my own question, I found this.发布我自己的问题的答案,我发现了这一点。 .
.
Source: R/relativeOverfitting.R
资料来源:
R/relativeOverfitting.R
Estimates the relative overfitting of a model as the ratio of the difference in test and train performance to the difference of test performance in the no-information case and train performance.将模型的相对过拟合估计为测试和训练性能差异与无信息情况下测试性能和训练性能差异的比率。 In the no-information case the features carry no information with respect to the prediction.
在无信息情况下,特征不携带关于预测的信息。 This is simulated by permuting features and predictions.
这是通过置换特征和预测来模拟的。
estimateRelativeOverfitting(
predish,
measures,
task,
learner = NULL,
pred.train = NULL,
iter = 1
)
Arguments参数
character(1)
) The learner.character(1)
)学习者。 If you pass a string the learner will be created via makeLearner .
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.