如何从 h2o 中的 stackedsamble 获取所有基本模型

发布于 2025-01-19 01:48:57 字数 86 浏览 0 评论 0原文

我在数据集上使用了 H2O 的 automl,顶部模型是 stackedensemble 模型。我喜欢获取所有基础模型及其堆叠模型的参数。我如何获得这个模型?

I used H2O's automl on my dataset, and the top model is a stackedensemble model. I like to get all basemodels with it's parameters of this stacked model. How do I get this models?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

栖竹 2025-01-26 01:48:57

您可以使用aml.-leader获得顶级模型,也可以使用 get_best_model 按照某些标准选择模型。如果要从排行榜中选择一些特定的模型,则可以使用h2o.get_model(“ model_id”)(model_id来自排行榜)。

为了从所有基本模型中获取参数,您可以使用以下内容:

{base_model: h2o.get_model(base_model).actual_params
 for base_model in h2o.get_model("model_id").base_models}

您可能还希望从堆叠的集合和Metalearner中获取参数:

metalearner_params = h2o.get_model("SE_model_id").metalearner().actual_params
se_params = h2o.get_model("SE_model_id").actual_params

You can use aml.leader to get the top model or you can use get_best_model to pick the model by some criterium. If you want to pick some specific model from the leaderboard you can use h2o.get_model("model_id") (the model_id is from the leaderboard).

To get parameters from all the base models you can use the following:

{base_model: h2o.get_model(base_model).actual_params
 for base_model in h2o.get_model("model_id").base_models}

You might also want to get parameters from the stacked ensemble and the metalearner:

metalearner_params = h2o.get_model("SE_model_id").metalearner().actual_params
se_params = h2o.get_model("SE_model_id").actual_params
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文