TensorFlow Machine Learning Cookbook

Book description

Explore machine learning concepts using the latest numerical computing library - TensorFlow - with the help of this comprehensive cookbook

About This Book

  • Your quick guide to implementing TensorFlow in your day-to-day machine learning activities
  • Learn advanced techniques that bring more accuracy and speed to machine learning
  • Upgrade your knowledge to the second generation of machine learning with this guide on TensorFlow

Who This Book Is For

This book is ideal for data scientists who are familiar with C++ or Python and perform machine learning activities on a day-to-day basis. Intermediate and advanced machine learning implementers who need a quick guide they can easily navigate will find it useful.

What You Will Learn

  • Become familiar with the basics of the TensorFlow machine learning library
  • Get to know Linear Regression techniques with TensorFlow
  • Learn SVMs with hands-on recipes
  • Implement neural networks and improve predictions
  • Apply NLP and sentiment analysis to your data
  • Master CNN and RNN through practical recipes
  • Take TensorFlow into production

In Detail

TensorFlow is an open source software library for Machine Intelligence. The independent recipes in this book will teach you how to use TensorFlow for complex data computations and will let you dig deeper and gain more insights into your data than ever before. You'll work through recipes on training models, model evaluation, sentiment analysis, regression analysis, clustering analysis, artificial neural networks, and deep learning ? each using Google's machine learning library TensorFlow.

This guide starts with the fundamentals of the TensorFlow library which includes variables, matrices, and various data sources. Moving ahead, you will get hands-on experience with Linear Regression techniques with TensorFlow. The next chapters cover important high-level concepts such as neural networks, CNN, RNN, and NLP.

Once you are familiar and comfortable with the TensorFlow ecosystem, the last chapter will show you how to take it to production.

Style and approach

This book takes a recipe-based approach where every topic is explicated with the help of a real-world example.

Table of contents

  1. TensorFlow Machine Learning Cookbook
    1. Table of Contents
    2. TensorFlow Machine Learning Cookbook
    3. Credits
    4. About the Author
    5. About the Reviewer
    6. www.PacktPub.com
      1. eBooks, discount offers, and more
        1. Why Subscribe?
    7. Customer Feedback
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Sections
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      5. Conventions
      6. Reader feedback
      7. Customer support
        1. Downloading the example code
        2. Piracy
        3. Questions
    9. 1. Getting Started with TensorFlow
      1. Introduction
      2. How TensorFlow Works
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      3. Declaring Tensors
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      4. Using Placeholders and Variables
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      5. Working with Matrices
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Declaring Operations
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      7. Implementing Activation Functions
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      8. Working with Data Sources
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      9. Additional Resources
        1. Getting ready
        2. How to do it…
        3. See also
    10. 2. The TensorFlow Way
      1. Introduction
      2. Operations in a Computational Graph
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Layering Nested Operations
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      4. Working with Multiple Layers
        1. Getting ready
        2. How to do it…
        3. How it works…
      5. Implementing Loss Functions
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      6. Implementing Back Propagation
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      7. Working with Batch and Stochastic Training
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      8. Combining Everything Together
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      9. Evaluating Models
        1. Getting ready
        2. How to do it…
        3. How it works…
    11. 3. Linear Regression
      1. Introduction
      2. Using the Matrix Inverse Method
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Implementing a Decomposition Method
        1. Getting ready
        2. How to do it…
        3. How it works…
      4. Learning The TensorFlow Way of Linear Regression
        1. Getting ready
        2. How to do it…
        3. How it works…
      5. Understanding Loss Functions in Linear Regression
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      6. Implementing Deming regression
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Implementing Lasso and Ridge Regression
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's' more…
      8. Implementing Elastic Net Regression
        1. Getting ready
        2. How to do it…
        3. How it works…
      9. Implementing Logistic Regression
        1. Getting ready
        2. How to do it…
        3. How it works…
    12. 4. Support Vector Machines
      1. Introduction
      2. Working with a Linear SVM
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Reduction to Linear Regression
        1. Getting ready
        2. How to do it…
        3. How it works…
      4. Working with Kernels in TensorFlow
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      5. Implementing a Non-Linear SVM
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Implementing a Multi-Class SVM
        1. Getting ready
        2. How to do it…
        3. How it works…
    13. 5. Nearest Neighbor Methods
      1. Introduction
      2. Working with Nearest Neighbors
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      3. Working with Text-Based Distances
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      4. Computing with Mixed Distance Functions
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      5. Using an Address Matching Example
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Using Nearest Neighbors for Image Recognition
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
    14. 6. Neural Networks
      1. Introduction
      2. Implementing Operational Gates
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Working with Gates and Activation Functions
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      4. Implementing a One-Layer Neural Network
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      5. Implementing Different Layers
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Using a Multilayer Neural Network
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Improving the Predictions of Linear Models
        1. Getting ready
        2. How to do it
        3. How it works…
      8. Learning to Play Tic Tac Toe
        1. Getting ready
        2. How to do it…
        3. How it works…
    15. 7. Natural Language Processing
      1. Introduction
      2. Working with bag of words
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      3. Implementing TF-IDF
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      4. Working with Skip-gram Embeddings
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      5. Working with CBOW Embeddings
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      6. Making Predictions with Word2vec
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      7. Using Doc2vec for Sentiment Analysis
        1. Getting ready
        2. How to do it…
        3. How it works…
    16. 8. Convolutional Neural Networks
      1. Introduction
      2. Implementing a Simpler CNN
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      3. Implementing an Advanced CNN
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      4. Retraining Existing CNNs models
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      5. Applying Stylenet/Neural-Style
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      6. Implementing DeepDream
        1. Getting ready
        2. How to do it…
        3. There's more…
        4. See also
    17. 9. Recurrent Neural Networks
      1. Introduction
      2. Implementing RNN for Spam Prediction
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      3. Implementing an LSTM Model
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      4. Stacking multiple LSTM Layers
        1. Getting ready
        2. How to do it…
        3. How it works…
      5. Creating Sequence-to-Sequence Models
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      6. Training a Siamese Similarity Measure
        1. Getting ready
        2. How to do it…
        3. There's more…
    18. 10. Taking TensorFlow to Production
      1. Introduction
      2. Implementing unit tests
        1. Getting ready
        2. How it works…
      3. Using Multiple Executors
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      4. Parallelizing TensorFlow
        1. Getting ready
        2. How to do it…
        3. How it works…
      5. Taking TensorFlow to Production
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Productionalizing TensorFlow – An Example
        1. Getting ready
        2. How to do it…
        3. How it works…
    19. 11. More with TensorFlow
      1. Introduction
      2. Visualizing graphs in Tensorboard
        1. Getting ready
        2. How to do it…
      3. There's more…
      4. Working with a Genetic Algorithm
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      5. Clustering Using K-Means
        1. Getting ready
        2. How to do it…
        3. There's more…
      6. Solving a System of ODEs
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
    20. Index

Product information

  • Title: TensorFlow Machine Learning Cookbook
  • Author(s): Nick McClure
  • Release date: February 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781786462169