mlr3pipelines
mlr3pipelines copied to clipboard
Suggestion for ID suggestion improvement
I think a relatively common user error (at least for not so experienced users) is that they forget the prefixes when setting graph parameters:
(e.g. nrounds instead of classif.xgboost.nrounds below.
The problem is that our "Did you mean" does not find the correct suggestions.
I think this might be a common enough error to address this, e.g. by matching grepl("<user-param>$", param_set$ids).
library(mlr3verse)
#> Loading required package: mlr3
graph = po("pca") %>>%
lrn("classif.xgboost")
graph$param_set$set_values(
nrounds = 10
)
#> Error in self$assert(xs, sanitize = TRUE): Assertion on 'xs' failed: Parameter 'nrounds' not available. Did you mean 'pca.center' / 'pca.scale.' / 'pca.rank.'?.
Created on 2025-03-21 with reprex v2.1.1