Skip to Main Content
Apache Spark Deep Learning Cookbook
book

Apache Spark Deep Learning Cookbook

by Ahmed Sherif, Amrith Ravindra, Michal Malohlava, Adnan Masood
July 2018
Intermediate to advanced content levelIntermediate to advanced
474 pages
13h 37m
English
Packt Publishing
Content preview from Apache Spark Deep Learning Cookbook

How it works...

This section explains the transformations needed on the data to be used in the model.

  1. One of the first steps to building a model is splitting the data into a training and test dataset for model evaluation purposes. Our goal is to use all of the stock quotes from 2000 through 2016 to predict stock trends in 2017-2018. We know from previous sections that we have a total of 4,610 days of stock quotes, but we don't know exactly how many fall in each year. We can use the groupBy() function within the dataframe to get a unique count of stock quotes per year, as can be seen in the following screenshot:
  1. 2016 and 2017's combined ...
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.
Start your free trial

You might also like

Apache Spark for Data Science Cookbook

Apache Spark for Data Science Cookbook

Padma Priya Chitturi
Learning Apache Spark 2

Learning Apache Spark 2

Muhammad Asif Abbasi

Publisher Resources

ISBN: 9781788474221Supplemental Content