简体   繁体   English

mlr3把最后的model保存在哪里?

[英]Where does mlr3 save the final model?

Where does mlr3 save the final model, after training a learner --- learner$train(data) ? mlr3 在训练学习者之后将最终的mlr3保存在哪里 --- learner$train(data) By "final model", I mean something like a list produced by the following code:通过“最终模型”,我的意思是类似于由以下代码生成的列表:

model <- xgboost::xgb.train(data = data_train, 
                                   max.depth = 8, nthread = 2, nrounds = 15,
                                   verbose = 0)  

Is there a way to extract this list/object?有没有办法提取这个列表/对象?


task <- TaskRegr$new("data", data, "y")
learner <- lrn("regr.xgboost")
preprocess <- po("scale", param_vals = list(center = TRUE, scale = TRUE))
pp <- preprocess %>>% learner
gg<- GraphLearner$new(pp)
gg$train(task)

In xgboost the 'model' is stored as:在 xgboost 中,“模型”存储为:

model <- xgboost::xgb.train(data = data_train, 
                                   max.depth = 8, nthread = 2, nrounds = 15,
                                   verbose = 0)

In MLR3, when trained using:在 MLR3 中,训练时使用:

task <- TaskRegr$new("data", data, "y")
learner <- lrn("regr.xgboost")
preprocess <- po("scale", param_vals = list(center = TRUE, scale = TRUE))
pp <- preprocess %>>% learner
gg<- GraphLearner$new(pp)
gg$train(task)

The equivalent to 'model' is stored as相当于“模型”存储为

gg$model$regr.xgboost$model

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM