Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Apache Spark Deep Learning Cookbook

You're reading from   Apache Spark Deep Learning Cookbook Over 80 best practice recipes for the distributed training and deployment of neural networks using Keras and TensorFlow

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781788474221
Length 474 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Ahmed Sherif Ahmed Sherif
Author Profile Icon Ahmed Sherif
Ahmed Sherif
 Ravindra Ravindra
Author Profile Icon Ravindra
Ravindra
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Title Page
Copyright and Credits
Packt Upsell
Foreword
Contributors
Preface
1. Setting Up Spark for Deep Learning Development FREE CHAPTER 2. Creating a Neural Network in Spark 3. Pain Points of Convolutional Neural Networks 4. Pain Points of Recurrent Neural Networks 5. Predicting Fire Department Calls with Spark ML 6. Using LSTMs in Generative Networks 7. Natural Language Processing with TF-IDF 8. Real Estate Value Prediction Using XGBoost 9. Predicting Apple Stock Market Cost with LSTM 10. Face Recognition Using Deep Convolutional Networks 11. Creating and Visualizing Word Vectors Using Word2Vec 12. Creating a Movie Recommendation Engine with Keras 13. Image Classification with TensorFlow on Spark 1. Other Books You May Enjoy Index

Comparing model performance to a baseline score


While it is great that we have a high accuracy score from our model of 91.7 percent, it is also important to compare this to a baseline score. We dig deeper into this concept in this section.

How to do it...

This section walks through the steps to calculate the baseline accuracy.

  1. Execute the following script to retrieve the mean value from the describe() method:
predictionDF.describe('label').show()
  1. Subtract 1- mean value score to calculate baseline accuracy.

How it works...

This section explains the concept behind the baseline accuracy and how we can use it to understand the effectiveness of our model.

  1. What if every chat conversation was flagged for do_not_escalate or vice versa. Would we have a baseline accuracy higher than 91.7 percent? The easiest way to figure this out is to run the describe() method on the label column from predictionDF using the following script: predictionDF.describe('label').show()
  2. The output of the script can be seen in the...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images