在 Spark 中堆叠 ML 算法 [英] Stacking ML Algorithms in Spark

查看:38
本文介绍了在 Spark 中堆叠 ML 算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有用于在 spark 中构建堆叠集成的 spark api 还是应该从头开始构建它们?我还没有在网上找到关于这个主题的任何资源

Is there a spark api to build stacking ensembles in spark or should one build them from scratch? I haven’t found any resources online about this topic

推荐答案

正如 AKSW 的评论中所说,在当前的 Apache Spark MLlib 中只有两种 Ensemble Models 的具体实现,它们是 随机森林 用于装袋和 梯度提升树用于提升.

As said in the comment of AKSW, in the current Apache Spark MLlib there is only two specific implementations of Ensemble Models which are Random Forests for Bagging and Gradient Boosted Trees for Boosting.

对于堆叠部分,我认为您在 MLlib 上找不到任何东西,您必须通过以下任一方式自行完成:

For the stacking part I don't think there is something you can find on MLlib, you have to do it by your own by either :

  1. 创建一个函数来生成一个流水线,该流水线将通过添加具有向量汇编器和最终堆叠算法的基本学习器来进行堆叠
  2. 创建一个元估计器,将您的基础学习器和您的堆叠算法作为参数

第二个很方便,因为它可以与所有 MLlib 工具一起使用,如 调整工具

The second one is convenient because it can work with all the MLlib tools as Tuning Tools

对于第二个解决方案,我制作了一个包含 Boosting、Bagging 和 Stacking Meta-Estimators 的库:火花组合

For the second solution I have made a library that contains a Boosting, Bagging and Stacking Meta-Estimators : spark-ensemble

你可以从中获取一些实现的想法!

You can take some implementations ideas out of that !

这篇关于在 Spark 中堆叠 ML 算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆