Skip to Content
Spark机器学习实战
book

Spark机器学习实战

by Posts & Telecom Press, Siamak Amirghodsi, Meenakshi Rajendran, Broderick Hall, Shuen Mei
May 2024
Beginner to intermediate
549 pages
8h 11m
Chinese
Packt Publishing
Content preview from Spark机器学习实战

第10章 使用决策树和集成模型构建机器学习系统

在本章中,我们将讨论以下内容:

  • 获取和预处理实际的医疗数据,研究Spark 2.0中的决策树和集成模型;
  • 使用Spark 2.0的决策树构建分类系统;
  • 使用Spark 2.0的决策树解决回归问题;
  • 使用Spark 2.0的随机森林构建分类系统;
  • 使用Spark 2.0的随机森林解决回归问题;
  • 使用Spark 2.0的梯度提升树(GBT)构建分类系统;
  • 使用Spark 2.0的梯度提升树(GBT)解决回归问题。

决策树是在商业领域应用最久远、最广泛的机器学习方法之一。决策树流行不仅是因为它具有处理复杂的分区和分割问题的能力(比线性模型更灵活),还因为它能解释如何实现解决方案,以及为什么结果能被预测或分类为一个类或标签。

Apache Spark提供了一套决策树算法的完美组合方案,能够完全充分利用Spark的并行性。Spark的实现方案从直接单一的决策树(CART算法)到集成树,例如随机森林和GBT(梯度提升树),它们都有能处理分类(例如分类变量,比如高度=短/高)或回归(比如连续变量,比如身高=2.5米)问题的各种变种。

图10-1所示的思维导图描述了在本书完成编写之时,Spark机器学习库所包含的决策树算法。

图片 1

图10-1

快速理解决策树算法的一种简便方法是将其视作一种试图最小化损失函数(例如L2或最小二乘)的智能分区算法,尝试将取值范围分区寻找能最佳拟合数据决策边界的分割空间。通过对数据重采样、特征组合,决策树可以集成为一种更复杂的集成模型,集成模型中的各个学习器(原始的部分样本或者某种特征组合)通过投票机制得到最终结果。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python计算机视觉和自然语言处理

Python计算机视觉和自然语言处理

Posts & Telecom Press, Álvaro Morena Alberolaï, Gonzalo Molina Gallegoï, Unai Garay Maestreï
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9781836201830