有没有办法在使用mlr中的包装器执行预处理步骤后访问数据?这是代码的剥离版本:
library(mlr)
library(mlbench)
data <- BreastCancer[, 2:11]
lrn <- makeLearner(cl = "classif.ranger",
predict.type = "prob",
fix.factors.prediction = TRUE,
importance = "permutation")
lrn <- makeImputeWrapper(lrn, classes = list(integer = imputeMedian(),
numeric = imputeHist(),
factor = imputeMode()))
lrn <- makeRemoveConstantFeaturesWrapper(lrn, na.ignore = TRUE)
classif.task <- makeClassifTask(data = rawdata, target = "Target", positive = "1")
model <- train(lrn, classif.task)
该代码定义了一个学习器,删除了常量特征并执行了插补。有没有办法查看删除常量特征后数据的样子,或者更有趣的是,在插补后数据会是什么样子?