Book Image

Apache Spark Deep Learning Cookbook

By : Ahmed Sherif, Amrith Ravindra
Book Image

Apache Spark Deep Learning Cookbook

By: Ahmed Sherif, Amrith Ravindra

Overview of this book

Organizations these days need to integrate popular big data tools such as Apache Spark with highly efficient deep learning libraries if they’re looking to gain faster and more powerful insights from their data. With this book, you’ll discover over 80 recipes to help you train fast, enterprise-grade, deep learning models on Apache Spark. Each recipe addresses a specific problem, and offers a proven, best-practice solution to difficulties encountered while implementing various deep learning algorithms in a distributed environment. The book follows a systematic approach, featuring a balance of theory and tips with best practice solutions to assist you with training different types of neural networks such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs). You’ll also have access to code written in TensorFlow and Keras that you can run on Spark to solve a variety of deep learning problems in computer vision and natural language processing (NLP), or tweak to tackle other problems encountered in deep learning. By the end of this book, you'll have the skills you need to train and deploy state-of-the-art deep learning models on Apache Spark.
Table of Contents (21 chapters)
Title Page
Copyright and Credits
Packt Upsell
Foreword
Contributors
Preface
Index

Foreword

If you are reading that, it's safe to assume that you are well-aware of the tremendous impact of Artificial Intelligence (AI) and Machine Learning (ML), and the uncanny effectiveness of deep neural networks. Matei Zaharia and his team started Spark, not as a competitor to Hadoop, but rather as an effort towards the democratization of AI and ML. As Zaharia has famously said, The only focus in Spark is how you compute stuff, not where you store it. Dubbed as unified analytics engine for large-scale data processing, Spark is optimized for resilience, speed, ease of use, generality, and run-everywhere features, and this book does a phenomenal job explaining it to you, converting you to a spark enthusiast.

As a reader, if you are excited about getting started with Spark's application in deep learning, this book can help. The authors begin by helping to set up Spark for Deep Learning development by providing clear and concisely written recipes. The initial setup is naturally followed by creating a neural network, elaborating on the pain points of convolutional neural networks, and recurrent neural networks. AI find new use cases every day, mostly starting with verticals. In the practitioner's spirit, authors provided practical (yet simplified) use cases of predicting fire department calls with SparkML, real estate value prediction using XGBoost, predicting the stock market cost of Apple with LSTM, and creating a movie recommendation engine with Keras.

The AI and ML landscape is nothing if not heterogeneous; the dizzying diversity of toolset and libraries can be intimidating. The authors do an excellent job mixing it up with different libraries, and incorporating relevant yet diverse technologies as the reader moves forward in the book. As deep learning frameworks start to converge and move up in abstraction, the scale of the exploratory data analysis inevitably grows. That's why instead of creating a proverbial one-trick pony (or YOLO model, pun intended), the book covers pertinent and highly relevant technologies such as LSTMs in Generative Networks, natural language processing with TF-IDF, face recognition using deep convolutional networks, creating and visualizing word vectors using Word2Vec and image classification with TensorFlow on Spark. Aside from crisp and focused writing, this wide array of highly relevant ML and deep learning topics give the book its core strength.

I have had a unique opportunity to see Spark in action, both in academia and in the industry. As a Stanford visiting scholar, I have attended various sessions by Matei Zaharia, the co-creator of Spark and enjoyed his vision concerning Databricks, the operationalization of algorithms at scale, and future of big data. At the same time as a practitioner and chief architect of AI and ML, I witness first-hand how world's largest retailer labs standardized their operational ML model deployments with Spark. As cloud enables new data application architectures, I see Spark as a key enabler and accelerator for new and unpreceded ML implementations across a variety of industry verticals. The rationale is quite simple; C-suite looks at cutting-edge modern technology to go beyond typical developer's hello world test or a science project. It needs to solve a real-world business problem at scale, have a thriving eco-system, and ability to provide enterprise-grade SLAs with around the clock support. Spark fulfill all these criteria; and goes beyond the basics with unprecedented speed, resilience, and community adaption. Spark is regularly used in advance analytics; use cases such as complex outlier analysis for system telemetry that observes and perceives meaningful patterns prior to these becoming unanticipated problems, or a missed opportunity as outliers can be both. Consider Spark as a tool that bridges the gap between traditional BI, and modern ML enabled services for delivering meaningful business outcomes. As data becomes the central competitive advantage, it is crucial to see disruptions before they occur, all while keeping account of seasonality, cyclicity, and ever-increasing temporal correlations. Ease of operationalization is the key to industry adaption, and that's where Spark shines like no other; data to insight, and insight to action.

This manuscript you are holding is another step towards democratization of AI, and ML by providing you the tools and techniques to apply in real-world problems. Consider it your head start on a journey of discovery, to become not a Spark superstar but rather a well-rounded ML engineer and evangelist. We hope this book will help you leverage Apache Spark to tackle business and technology-related issues easily, and efficiently.

 

 

Adnan Masood, PhD Visiting Scholar, Dept. of Computer Engineering. Stanford University Chief Architect AI & ML – Microsoft MVP Gates Computer Science Building, Stanford. June 12th, 2018