Machine learning 在mlr3中创建学习者:sprintf中出错(msg,…):参数太少
我想使用District软件包在mlr3中创建一个学习者 我的代码:Machine learning 在mlr3中创建学习者:sprintf中出错(msg,…):参数太少,machine-learning,mlr3,Machine Learning,Mlr3,我想使用District软件包在mlr3中创建一个学习者 我的代码: library(mlr3extralearners) create_learner( pkg = "." , classname = 'distRforest', algorithm = 'regression tree', type = 'regr', key = 'distRforest',
library(mlr3extralearners)
create_learner( pkg = "." ,
classname = 'distRforest',
algorithm = 'regression tree',
type = 'regr',
key = 'distRforest',
package = 'distRforest',
caller = 'rpart',
feature_types = c("logical", "integer", "numeric","factor", "ordered"),
predict_types = c('response'),
properties = c("importance", "missings", "multiclass",
"selected_features", "twoclass", "weights"),
references = FALSE,
gh_name = 'CL'
)
给出以下错误:sprintf中的错误(msg,…):参数太少
事实上,复制教程中的代码会引发相同的错误
有什么想法吗?非常感谢-c感谢您对扩展mlr3宇宙的兴趣! 有两件事,首先,书中的示例对我来说很好,其次,您的示例无法工作,因为您为
regr
学习者包含classif
属性。由于我无法重现您的错误,因此我很难调试出错的地方,如果您可以运行以下程序,这将非常有用:
reprex::reprex({
create_learner(
pkg = ".",
classname = "Rpart",
algorithm = "decision tree",
type = "classif",
key = "rpartddf",
package = "rpart",
caller = "rpart",
feature_types = c("logical", "integer", "numeric", "factor", "ordered"),
predict_types = c("response", "prob"),
properties = c("importance", "missings", "multiclass", "selected_features", "twoclass", "weights"),
references = TRUE,
gh_name = "CL"
)
}, si = TRUE)
如果您仍然收到错误,并且输出太长,无法在此处打印,请转到GitHub并在那里打开一个问题。感谢您对扩展mlr3领域的兴趣! 有两件事,首先,书中的示例对我来说很好,其次,您的示例无法工作,因为您为
regr
学习者包含classif
属性。由于我无法重现您的错误,因此我很难调试出错的地方,如果您可以运行以下程序,这将非常有用:
reprex::reprex({
create_learner(
pkg = ".",
classname = "Rpart",
algorithm = "decision tree",
type = "classif",
key = "rpartddf",
package = "rpart",
caller = "rpart",
feature_types = c("logical", "integer", "numeric", "factor", "ordered"),
predict_types = c("response", "prob"),
properties = c("importance", "missings", "multiclass", "selected_features", "twoclass", "weights"),
references = TRUE,
gh_name = "CL"
)
}, si = TRUE)
如果您仍然收到错误,并且输出太长,无法在此处打印,请转到GitHub并在那里打开一个问题。您好,感谢您的快速回复。运行代码会在sprintf(msg,…)中出现#>错误:参数太少请运行我发送的代码并将输出粘贴到新问题中:这在GitHub上得到了回答:。满意时请在这里标记为已回答。刚刚看到此。谢谢嗨,谢谢你的快速回复。运行代码会在sprintf(msg,…)中出现#>错误:参数太少请运行我发送的代码并将输出粘贴到新问题中:这在GitHub上得到了回答:。满意时请在这里标记为已回答。刚刚看到此。谢谢