请问如何GraphLearner$new
在 r-drake 中使用函数进行转换。以下代码:
learner_plan = drake_plan(
## 1. Choose learner--------------------------------------------------------
polrn_classif = target(fnc_po_learner(list_learners),
transform = map(
list_learners = c(
"classif.ranger",
"classif.lightgbm",
"classif.xgboost",
"classif.log_reg",
"classif.svm"
)
)),
graph_classif = target(
imputer_classif %>>% filter_classif %>>% polrn_classif,
transform = map(polrn_classif)
),
glrn_classif = target({
GraphLearner$new(graph = graph_classif) # get error ---------- it's not transform
transform = map(graph_classif)
})
)
learner_plan