O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applied Deep Learning with Python

Book Description

A hands-on guide to deep learning that's filled with intuitive explanations and engaging practical examples

Key Features

  • Designed to iteratively develop the skills of Python users who don't have a data science background
  • Covers the key foundational concepts you'll need to know when building deep learning systems
  • Full of step-by-step exercises and activities to help build the skills that you need for the real-world

Book Description

Taking an approach that uses the latest developments in the Python ecosystem, you'll first be guided through the Jupyter ecosystem, key visualization libraries and powerful data sanitization techniques before we train our first predictive model. We'll explore a variety of approaches to classification like support vector networks, random decision forests and k-nearest neighbours to build out your understanding before we move into more complex territory. It's okay if these terms seem overwhelming; we'll show you how to put them to work.

We'll build upon our classification coverage by taking a quick look at ethical web scraping and interactive visualizations to help you professionally gather and present your analysis. It's after this that we start building out our keystone deep learning application, one that aims to predict the future price of Bitcoin based on historical public data.

By guiding you through a trained neural network, we'll explore common deep learning network architectures (convolutional, recurrent, generative adversarial) and branch out into deep reinforcement learning before we dive into model optimization and evaluation. We'll do all of this whilst working on a production-ready web application that combines Tensorflow and Keras to produce a meaningful user-friendly result, leaving you with all the skills you need to tackle and develop your own real-world deep learning projects confidently and effectively.

What you will learn

  • Discover how you can assemble and clean your very own datasets
  • Develop a tailored machine learning classification strategy
  • Build, train and enhance your own models to solve unique problems
  • Work with production-ready frameworks like Tensorflow and Keras
  • Explain how neural networks operate in clear and simple terms
  • Understand how to deploy your predictions to the web

Who this book is for

If you're a Python programmer stepping into the world of data science, this is the ideal way to get started.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Applied Deep Learning with Python
  3. Packt Upsell
    1. Why subscribe?
    2. Packt.com
  4. Contributors
    1. About the authors
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Conventions used
    4. Get in touch
      1. Reviews
  6. Jupyter Fundamentals
    1. Basic Functionality and Features
      1. What is a Jupyter Notebook and Why is it Useful?
      2. Navigating the Platform
        1. Introducing Jupyter Notebooks
      3. Jupyter Features
        1. Exploring some of Jupyter's most useful features
        2. Converting a Jupyter Notebook to a Python Script
      4. Python Libraries
        1. Import the external libraries and set up the plotting environment
    2. Our First Analysis - The Boston Housing Dataset
      1. Loading the Data into Jupyter Using a Pandas DataFrame
        1. Load the Boston housing dataset
      2. Data Exploration
        1. Explore the Boston housing dataset
      3. Introduction to Predictive Analytics with Jupyter Notebooks
        1. Linear models with Seaborn and scikit-learn
      4. Activity:Building a Third-Order Polynomial Model
        1. Linear models with Seaborn and scikit-learn
      5. Using Categorical Features for Segmentation Analysis
        1. Create categorical filelds from continuous variables and make segmented visualizations
    3. Summary
  7. Data Cleaning and Advanced Machine Learning
    1. Preparing to Train a Predictive Model
      1. Determining a Plan for Predictive Analytics
      2. Preprocessing Data for Machine Learning
        1. Exploring data preprocessing tools and methods
      3. Activity:Preparing to Train a Predictive Model for the Employee-Retention Problem
    2. Training Classification Models
      1. Introduction to Classification Algorithms
        1. Training two-feature classification models with scikitlearn
        2. The plot_decision_regions Function
        3. Training k-nearest neighbors for our model
        4. Training a Random Forest
      2. Assessing Models with k-Fold Cross-Validation and Validation Curves
        1. Using k-fold cross validation and validation curves in Python with scikit-learn
      3. Dimensionality Reduction Techniques
        1. Training a predictive model for the employee retention problem
    3. Summary
  8. Web Scraping and Interactive Visualizations
    1. Scraping Web Page Data
      1. Introduction to HTTP Requests
      2. Making HTTP Requests in the Jupyter Notebook
        1. Handling HTTP requests with Python in a Jupyter Notebook
      3. Parsing HTML in the Jupyter Notebook
        1. Parsing HTML with Python in a Jupyter Notebook
      4. Activity:Web Scraping with Jupyter Notebooks
    2. Interactive Visualizations
      1. Building a DataFrame to Store and Organize Data
        1. Building and merging Pandas DataFrames
      2. Introduction to Bokeh
        1. Introduction to interactive visualizations with Bokeh
      3. Activity:Exploring Data with Interactive Visualizations
    3. Summary
  9. Introduction to Neural Networks and Deep Learning
    1. What are Neural Networks?
      1. Successful Applications
      2. Why Do Neural Networks Work So Well?
        1. Representation Learning
        2. Function Approximation
      3. Limitations of Deep Learning
        1. Inherent Bias and Ethical Considerations
      4. Common Components and Operations of Neural Networks
    2. Configuring a Deep Learning Environment
      1. Software Components for Deep Learning
        1. Python 3
        2. TensorFlow
        3. Keras
        4. TensorBoard
        5. Jupyter Notebooks, Pandas, and NumPy
      2. Activity:Verifying Software Components
      3. Exploring a Trained Neural Network
        1. MNIST Dataset
        2. Training a Neural Network with TensorFlow
        3. Training a Neural Network
        4. Testing Network Performance with Unseen Data
      4. Activity: Exploring a Trained Neural Network
    3. Summary
  10. Model Architecture
    1. Choosing the Right Model Architecture
      1. Common Architectures
        1. Convolutional Neural Networks
        2. Recurrent Neural Networks
        3. Generative Adversarial Networks
        4. Deep Reinforcement Learning
      2. Data Normalization
        1. Z-score
        2. Point-Relative Normalization
        3. Maximum and Minimum Normalization
      3. Structuring Your Problem
      4. Activity:Exploring the Bitcoin Dataset and Preparing Data for Model
    2. Using Keras as a TensorFlow Interface
      1. Model Components
      2. Activity:Creating a TensorFlow Model Using Keras
      3. From Data Preparation to Modeling
      4. Training a Neural Network
      5. Reshaping Time-Series Data
      6. Making Predictions
        1. Overfitting
      7. Activity:Assembling a Deep Learning System
    3. Summary
  11. Model Evaluation and Optimization
    1. Model Evaluation
      1. Problem Categories
      2. Loss Functions, Accuracy, and Error Rates
        1. Different Loss Functions, Same Architecture
      3. Using TensorBoard
      4. Implementing Model Evaluation Metrics
        1. Evaluating the Bitcoin Model
        2. Overfitting
        3. Model Predictions
        4. Interpreting Predictions
      5. Activity:Creating an Active Training Environment
    2. Hyperparameter Optimization
      1. Layers and Nodes - Adding More Layers
        1. Adding More Nodes
        2. Layers and Nodes - Implementation
      2. Epochs
        1. Epochs - Implementation
      3. Activation Functions
        1. Linear (Identity)
        2. Hyperbolic Tangent (Tanh)
        3. Rectifid Linear Unit
      4. Activation Functions - Implementation
      5. Regularization Strategies
        1. L2 Regularization
        2. Dropout
        3. Regularization Strategies – Implementation
      6. Optimization Results
      7. Activity:Optimizing a Deep Learning Model
    3. Summary
  12. Productization
    1. Handling New Data
      1. Separating Data and Model
        1. Data Component
        2. Model Component
      2. Dealing with New Data
        1. Re-Training an Old Model
        2. Training a New Model
      3. Activity:Dealing with New Data
    2. Deploying a Model as a Web Application
      1. Application Architecture and Technologies
      2. Deploying and Using Cryptonic
      3. Activity:Deploying a Deep Learning Application
    3. Summary
  13. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think