Reader small image

You're reading from  Applied Deep Learning with Keras

Product typeBook
Published inApr 2019
Reading LevelIntermediate
Publisher
ISBN-139781838555078
Edition1st Edition
Languages
Tools
Right arrow
Authors (3):
Ritesh Bhagwat
Ritesh Bhagwat
author image
Ritesh Bhagwat

Ritesh Bhagwat has a master's degree in applied mathematics with a specialization in computer science. He has over 14 years of experience in data-driven technologies and has led and been a part of complex projects ranging from data warehousing and business intelligence to machine learning and artificial intelligence. He has worked with top-tier global consulting firms as well as large multinational financial institutions. Currently, he works as a data scientist. Besides work, he enjoys playing and watching cricket and loves to travel. He is also deeply interested in Bayesian statistics.
Read more about Ritesh Bhagwat

Mahla Abdolahnejad
Mahla Abdolahnejad
author image
Mahla Abdolahnejad

Mahla Abdolahnejad is a Ph.D. candidate in systems and computer engineering with Carleton University, Canada. She also holds a bachelor's degree and a master's degree in biomedical engineering, which first exposed her to the field of artificial intelligence and artificial neural networks, in particular. Her Ph.D. research is focused on deep unsupervised learning for computer vision applications. She is particularly interested in exploring the differences between a human's way of learning from the visual world and a machine's way of learning from the visual world, and how to push machine learning algorithms toward learning and thinking like humans.
Read more about Mahla Abdolahnejad

Matthew Moocarme
Matthew Moocarme
author image
Matthew Moocarme

Matthew Moocarme is an accomplished data scientist with more than eight years of experience in creating and utilizing machine learning models. He comes from a background in the physical sciences, in which he holds a Ph.D. in physics from the Graduate Center of CUNY. Currently, he leads a team of data scientists and engineers in the media and advertising space to build and integrate machine learning models for a variety of applications. In his spare time, Matthew enjoys sharing his knowledge with the data science community through published works, conference presentations, and workshops.
Read more about Matthew Moocarme

View More author details
Right arrow

Preface

Note

About

This section briefly introduces the author, the coverage of this book, the technical skills you'll need to get started, and the hardware and software requirements required to complete all of the included activities and exercises.

About the Book

Applied Deep Learning with Keras takes you from a basic level of knowledge of machine learning and Python to an expert understanding of applying Keras to develop efficient deep learning solutions. To understand the difference between machine and deep learning, you will build a logistic regression model with scikit-learn and then with Keras. By building prediction models for several real-world scenarios, such as disease prediction and customer churn prediction, you will dive deep into Keras and its many models. You will also gain knowledge about how to evaluate, optimize, and improve your models to gain maximum information. You will learn how to use Keras wrappers with scikit-learn and implement cross-validation techniques on your findings, and apply L1, L2, and dropout regularization techniques to improve the accuracy of your model. To improve accuracy, you will learn how to apply the null accuracy, precision, sensitivity, specificity, and AUC-ROC score techniques to fine-tune your model. Then, you will explore convolutional and recurrent neural networks in detail.

By the end of this book, you will have all the skills you need to use Keras to your advantage and build superlative deep neural networks.

About the Authors

Ritesh Bhagwat has a master's degree in applied mathematics with a specialization in computer science. He has over 14 years of experience in data-driven technologies and has led and been a part of complex projects ranging from data warehousing and business intelligence to machine learning and artificial intelligence. He has worked with top-tier global consulting firms as well as large multinational financial institutions. Currently, he works as a data scientist. Besides work, he enjoys playing and watching cricket and loves to travel. He is also deeply interested in Bayesian statistics.

Mahla Abdolahnejad is a Ph.D. candidate in systems and computer engineering with Carleton University, Canada. She also holds a bachelor's degree and a master's degree in biomedical engineering, which first exposed her to the field of artificial intelligence and artificial neural networks, in particular. Her Ph.D. research is focused on deep unsupervised learning for computer vision applications. She is particularly interested in exploring the differences between a human's way of learning from the visual world and a machine's way of learning from the visual world, and how to push machine learning algorithms toward learning and thinking like humans.

Matthew Moocarme is a director and senior data scientist in Viacom’s Advertising Science team. As a data scientist at Viacom, he designs data-driven solutions to help Viacom gain insights, streamline workflows, and solve complex problems using data science and machine learning.

Matthew lives in New York City and outside of work enjoys combining deep learning with music theory. He is a classically-trained physicist, holding a Ph.D. in Physics from The Graduate Center of CUNY and is an active Artificial Intelligence developer, researcher, practitioner, and educator.

Learning Objectives

In this book, you will be able to:

  • Understand the difference between single-layer and multi-layer neural network models

  • Use Keras to build simple logistic regression models, deep neural networks, recurrent neural networks, and convolutional neural networks

  • Apply L1, L2, and dropout regularization to improve the accuracy of your model

  • Implement cross-validate using Keras wrappers with scikit-learn

  • Understand the limitations of model accuracy

Audience

If you have basic knowledge about data science and machine learning and want to upgrade your skills to learn about artificial neural networks and deep learning, you can accomplish a lot with this book. Prior experience of programming in Python and familiarity with statistics and logistic regression will help you get the most out of this book. Though not necessary, it will be an added bonus if you are familiar with the scikit-learn library.

Approach

Applied Deep Learning with Keras takes a practical approach to equip beginners with the most essential data analysis tools in the shortest possible time. The book contains multiple activities that use real-life business scenarios for you to practice and apply your new skills in a highly relevant context.

Hardware Requirements

For the optimal experience, we recommend the following hardware configuration:

  • Any entry-level PC/Mac with Windows, Linux, or macOS is sufficient

  • Processor: Intel Core i5 or equivalent

  • Memory: 4 GB RAM

  • Storage: 35 GB available space

Software Requirements

You'll also need the following software installed in advance:

  • Operating system: Windows 7 SP1 64-bit, Windows 8.1 64-bit or Windows 10 64-bit, Ubuntu Linux, or the latest version of macOS

  • Browser: Google Chrome/Mozilla Firefox (latest version)

  • Notepad++/Sublime Text as IDE

  • Python 3.4+ (latest is Python 3.7) installed (from https://python.org)

  • Python libraries as needed (Jupyter, NumPy, pandas, Matplotlib, and others)

Conventions

Code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We use the skiprows argument if there is a header that usually contains column names."

A block of code is set as follows:

import numpy as np
data = np.loadtxt(filename, delimiter=",", skiprows=1)

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "The printed output should look as follows, showing that DataFrame has 4521 rows and 17 columns."

Installation and Setup

Before you start this book, we'll install Python 3.6, pip, scikit-learn, and the other libraries used throughout this book. You will find the steps to install them here:

Installing Python

Install Python 3.6 by following the instructions at this link: https://realpython.com/installing-python/.

Installing the Jupyter Notebook

Install the Jupyter Notebook by following the instructions at this link: https://jupyter.org/install.

Installing pip

  1. To install pip, go to this link and download the get-pip.py file: https://pip.pypa.io/en/stable/installing/.

  2. Then, use the following command to install it:

    python get-pip.py

    You might need to use the python3 get-pip.py command, due to previous versions of Python on your computer that already use the Python command.

Installing libraries

Using the pip command, install the following libraries:

python -m pip install --user numpy scipy matplotlib jupyter pandas 

Installing scikit-learn

Install scikit-learn by using the following command:

pip install -U scikit-learn

Installing Keras

Install Keras by following the instructions in this link: https://keras.io/#installation.

Installing the Code Bundle

Copy the code bundle for the class to the C:/Code folder.

Additional Resources

The code bundle for this book is also hosted on GitHub at https://github.com/TrainingByPackt/Applied-Deep-Learning-with-Keras.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Applied Deep Learning with Keras
Published in: Apr 2019Publisher: ISBN-13: 9781838555078
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.
undefined
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

Authors (3)

author image
Ritesh Bhagwat

Ritesh Bhagwat has a master's degree in applied mathematics with a specialization in computer science. He has over 14 years of experience in data-driven technologies and has led and been a part of complex projects ranging from data warehousing and business intelligence to machine learning and artificial intelligence. He has worked with top-tier global consulting firms as well as large multinational financial institutions. Currently, he works as a data scientist. Besides work, he enjoys playing and watching cricket and loves to travel. He is also deeply interested in Bayesian statistics.
Read more about Ritesh Bhagwat

author image
Mahla Abdolahnejad

Mahla Abdolahnejad is a Ph.D. candidate in systems and computer engineering with Carleton University, Canada. She also holds a bachelor's degree and a master's degree in biomedical engineering, which first exposed her to the field of artificial intelligence and artificial neural networks, in particular. Her Ph.D. research is focused on deep unsupervised learning for computer vision applications. She is particularly interested in exploring the differences between a human's way of learning from the visual world and a machine's way of learning from the visual world, and how to push machine learning algorithms toward learning and thinking like humans.
Read more about Mahla Abdolahnejad

author image
Matthew Moocarme

Matthew Moocarme is an accomplished data scientist with more than eight years of experience in creating and utilizing machine learning models. He comes from a background in the physical sciences, in which he holds a Ph.D. in physics from the Graduate Center of CUNY. Currently, he leads a team of data scientists and engineers in the media and advertising space to build and integrate machine learning models for a variety of applications. In his spare time, Matthew enjoys sharing his knowledge with the data science community through published works, conference presentations, and workshops.
Read more about Matthew Moocarme