变量重要性 P-值

huangapple go评论55阅读模式
英文:

Variable Importance P-Values

问题

importance_pvalues(https://rdrr.io/cran/ranger/man/importance_pvalues.html)命令是否可以通过mlr3使用?换句话说,我是否可以指示在调用学习器时输出p值?如果不能,我该如何提取ranger对象以用作importance_pvalues命令的输入?

英文:

Can the importance_pvalues (https://rdrr.io/cran/ranger/man/importance_pvalues.html) command be used via mlr3? In other words, can I indicate that I would like the p-values outputted in my call to the learner? If not, how would I go about extracting the ranger object to use as input for the importance_pvalues command?

答案1

得分: 1

你可以始终通过 mlr3 中的 $model 字段访问存储的模型。

library(mlr3verse)
library(ranger)

learner = lrn("classif.ranger", importance = "impurity_corrected")
learner$train(tsk("sonar"))

importance_pvalues(learner$model)
英文:

You can always access the stored model via the $model field in mlr3.

library(mlr3verse)
library(ranger)

learner = lrn("classif.ranger", importance = "impurity_corrected")
learner$train(tsk("sonar"))

importance_pvalues(learner$model)

huangapple
  • 本文由 发表于 2023年2月13日 22:57:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/75437551.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定