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机器学习实战

第5章 使用Spark 2.0实践机器学习中的回归和分类——第一部分

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

  • 使用传统的方式拟合一条线性回归直线;
  • Spark 2.0中的广义线性回归;
  • Spark 2.0中Lasso和L-BFGS的线性回归API;
  • Spark 2.0中Lasso和自动优化选择的线性回归API;
  • Spark 2.0中岭回归和自动优化选择的线性回归API;
  • Spark 2.0中的保序回归;
  • Spark 2.0中的多层感知机分类器;
  • Spark 2.0中的一对多分类器;
  • Spark 2.0中的生存回归——参数化的加速失效时间模型。

本章和下一章将重点介绍Spark 2.0 ML和MLlib库中有关回归和分类的基础技术。Spark 2.0已经表明下一阶段的新方向:(1)将基于RDD的回归算法(参见第6章)变更为维护模式;(2)继续推进线性回归和广义回归的演变。

在高层次上,新设计的API更倾向于Elastic网络的参数化,即动态生成岭回归、Lasso回归以及介于这两者之间的其他模型,而不是对API重新命名(如LassoWithSGD)。新API的设计更加简洁,能驱动开发者学习Elastic网络及其功能,但是开发者需要知道特征工程仍是数据科学中的一种艺术。本章会提供足够多的示例、算法和注释,指导开发者完成复杂的技术。

图5-1描述了本章中的回归和分类范围。

图片 1

图5-1

首先,你将学习如何从零开始使用Scala代码和RDD编程实现代数方程的线性回归,深刻理解数学以及为什么需要采用迭代优化方法估计大型回归系统的解。其次,探索广义线性模型(GLM)及其各种统计分布族和链接函数,但是需要注意在当前实现中存在4096个最大参数数目的限制。最后,研究使用线性回归模型(LRM)以及如何使用Elastic网络参数化混合以及匹配L1和L2惩罚函数,实现逻辑回归、岭回归、Lasso回归以及它们之间的所有其他算法。我们还要学习如何处理优化器方法,以及在使用L-BFGS优化、自动优化器选择时如何设置参数。 ...

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