没有合适的资源?快使用搜索试试~ 我知道了~
首页Learn PySpark. Build Python-based Machine Learning and Deep Learning Models
Learn PySpark. Build Python-based Machine Learning and Deep Lear...
需积分: 9 90 浏览量
更新于2023-05-27
评论
收藏 9.02MB PDF 举报
The idea of writing this book had already been seeded while I was working on my first book, and there was a strong reason for that. The earlier book was more focused on machine learning using big data and essentially did not deep-dive sufficiently into supporting aspects, but this book goes a little deeper into the internals of Spark’s machine learning library, as well as analyzing of streaming data. It is a good reference point for someone who wants to learn more about how to automate different workflows and build pipelines to handle real-time data.
资源详情
资源评论
资源推荐

PramodSingh
Build Python-based
Machine Learning and
Deep Learning Models
Learn PySpark

ISBN-13 (pbk): 978-1-4842-4960-4 ISBN-13 (electronic): 978-1-4842-4961-1
https://doi.org/10.1007/978-1-4842-4961-1
Any source code or other supplementary material referenced by the author in this book is available
to readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-4960-4.
For more detailed information, please visit www.apress.com/source-code.
PramodSingh
Bangalore, Karnataka, India
© 2019 by Pramod Singh
Learn PySpark:
Build Python-based Machine Learning and Deep Learning Models

Chapter 1: Introduction to Spark ����������������������������������������������������������1
History �������������������������������������������������������������������������������������������������������������������1
Data Collection ������������������������������������������������������������������������������������������������2
Data Storage ����������������������������������������������������������������������������������������������������3
Data Processing�����������������������������������������������������������������������������������������������3
Spark Architecture ������������������������������������������������������������������������������������������������4
Storage ������������������������������������������������������������������������������������������������������������5
Resource Management������������������������������������������������������������������������������������5
Engine and Ecosystem ������������������������������������������������������������������������������������8
Programming Language APIs ��������������������������������������������������������������������������9
Setting Up Your Environment ������������������������������������������������������������������������������10
Local Setup ����������������������������������������������������������������������������������������������������10
Dockers ���������������������������������������������������������������������������������������������������������11
Cloud Environments���������������������������������������������������������������������������������������11
Conclusion ����������������������������������������������������������������������������������������������������������16
Contents
Introduction ��������������������������������������������������������������������������������������xvii

Chapter 2: Data Processing ����������������������������������������������������������������17
Creating a SparkSession Object ��������������������������������������������������������������������������18
Creating Dataframes ��������������������������������������������������������������������������������������18
Null Values ����������������������������������������������������������������������������������������������������� 19
Subset of a Dataframe ����������������������������������������������������������������������������������������23
Select ������������������������������������������������������������������������������������������������������������24
Filter ��������������������������������������������������������������������������������������������������������������25
Where ������������������������������������������������������������������������������������������������������������26
Aggregations ������������������������������������������������������������������������������������������������������� 26
Collect ������������������������������������������������������������������������������������������������������������35
User-Defined Functions (UDFs) ���������������������������������������������������������������������������37
Pandas UDF ���������������������������������������������������������������������������������������������������40
Joins �������������������������������������������������������������������������������������������������������������������41
Pivoting ���������������������������������������������������������������������������������������������������������������43
Window Functions or Windowed Aggregates ������������������������������������������������������44
Conclusion ����������������������������������������������������������������������������������������������������������48
Chapter 3: Spark Structured Streaming ���������������������������������������������49
Batch vs� Stream �������������������������������������������������������������������������������������������������49
Batch Data �����������������������������������������������������������������������������������������������������50
Stream Processing ����������������������������������������������������������������������������������������50
Spark Streaming ��������������������������������������������������������������������������������������������51
Structured Streaming ������������������������������������������������������������������������������������������53
Data Input ������������������������������������������������������������������������������������������������������56
Data Processing���������������������������������������������������������������������������������������������57
Final Output ���������������������������������������������������������������������������������������������������57

Building a Structured App �����������������������������������������������������������������������������������57
Operations �����������������������������������������������������������������������������������������������������59
Joins �������������������������������������������������������������������������������������������������������������� 63
Structured Streaming Alternatives ����������������������������������������������������������������������65
Conclusion ����������������������������������������������������������������������������������������������������������65
Chapter 4: Airflow�������������������������������������������������������������������������������67
Workflows �����������������������������������������������������������������������������������������������������������67
Graph Overview ���������������������������������������������������������������������������������������������������69
Undirected Graphs ����������������������������������������������������������������������������������������� 69
Directed Graphs ��������������������������������������������������������������������������������������������� 70
DAG Overview �����������������������������������������������������������������������������������������������������71
Operators ������������������������������������������������������������������������������������������������������� 73
Installing Airflow �������������������������������������������������������������������������������������������������74
Airflow Using Docker �������������������������������������������������������������������������������������74
Creating Your First DAG ��������������������������������������������������������������������������������������� 76
Step 1: Importing the Required Libraries �������������������������������������������������������78
Step 2: Defining the Default Arguments ��������������������������������������������������������78
Step 3: Creating a DAG ����������������������������������������������������������������������������������79
Step 4: Declaring Tasks ���������������������������������������������������������������������������������79
Step 5: Mentioning Dependencies ����������������������������������������������������������������� 80
Conclusion ����������������������������������������������������������������������������������������������������������84
Chapter 5: MLlib: Machine Learning Library ��������������������������������������85
Calculating Correlations �������������������������������������������������������������������������������������� 86
Chi-Square Test ���������������������������������������������������������������������������������������������89
Transformations ��������������������������������������������������������������������������������������������������94
Binarizer ��������������������������������������������������������������������������������������������������������94
Principal Component Analysis �����������������������������������������������������������������������96
剩余213页未读,继续阅读














随机散步
- 粉丝: 0
- 资源: 10
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- Xilinx SRIO详解.pptx
- Informatica PowerCenter 10.2 for Centos7.6安装配置说明.pdf
- 现代无线系统射频电路实用设计卷II 英文版.pdf
- 电子产品可靠性设计 自己讲课用的PPT,包括设计方案的可靠性选择,元器件的选择与使用,降额设计,热设计,余度设计,参数优化设计 和 失效分析等
- MPC5744P-DEV-KIT-REVE-QSG.pdf
- 通信原理课程设计报告(ASK FSK PSK Matlab仿真--数字调制技术的仿真实现及性能研究)
- ORIGIN7.0使用说明
- 在VMware Player 3.1.3下安装Redhat Linux详尽步骤
- python学生信息管理系统实现代码
- 西门子MES手册 13 OpcenterEXCR_PortalStudio1_81RB1.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0