TensorFlow: Powerful Predictive Analytics with TensorFlow - Md. Rezaul Karim - E-Book

TensorFlow: Powerful Predictive Analytics with TensorFlow E-Book

Md. Rezaul Karim

0,0
32,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Predictive analytics discovers hidden patterns from structured and unstructured data for automated decision making in business intelligence. Predictive decisions are becoming a huge trend worldwide, catering to wide industry sectors by predicting which decisions are more likely to give maximum results. TensorFlow, Google’s brainchild, is immensely popular and extensively used for predictive analysis. This book is a quick learning guide on all the three types of machine learning, that is, supervised, unsupervised, and reinforcement learning with TensorFlow. This book will teach you predictive analytics for high-dimensional and sequence data. In particular, you will learn the linear regression model for regression analysis. You will also learn how to use regression for predicting continuous values. You will learn supervised learning algorithms for predictive analytics. You will explore unsupervised learning and clustering using K-meansYou will then learn how to predict neighborhoods using K-means, and then, see another example of clustering audio clips based on their audio features. This book is ideal for developers, data analysts, machine learning practitioners, and deep learning enthusiasts who want to build powerful, robust, and accurate predictive models with the power of TensorFlow. This book is embedded with useful assessments that will help you revise the concepts you have learned in this book. This book is repurposed for this specific learning experience from material from Packt's Predictive Analytics with TensorFlow by Md. Rezaul Karim.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Seitenzahl: 166

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

TensorFlow: Powerful Predictive Analytics with TensorFlow
Credits
Meet Your Expert
Preface
What's in It for Me?
What Will I Get From This Book?
Prerequisites
1. From Data to Decisions – Getting Started with TensorFlow
Taking Decisions Based on Data – Titanic Example
Data Value Chain for Making Decisions
From Disaster to Decision – Titanic Survival Example
General Overview of TensorFlow
Installing and Configuring TensorFlow
Installing TensorFlow on Linux
Installing Python and nVidia Driver
Installing NVIDIA CUDA
Installing NVIDIA cuDNN v5.1+
Installing the libcupti-dev Library
Installing TensorFlow
Installing TensorFlow with native pip
Installing with virtualenv
Installing TensorFlow from Source
Testing Your TensorFlow Installation
TensorFlow Computational Graph
TensorFlow Programming Model
Data Model in TensorFlow
Tensors
Rank
Shape
Data Type
Variables
Fetches
Feeds and Placeholders
TensorBoard
How Does TensorBoard Work?
Getting Started with TensorFlow – Linear Regression and Beyond
Source Code for the Linear Regression
Summary
Assessments
2. Putting Data in Place – Supervised Learning for Predictive Analytics
Supervised Learning for Predictive Analytics
Linear Regression – Revisited
Problem Statement
Using Linear Regression for Movie Rating Prediction
From Disaster to Decision – Titanic Example Revisited
An Exploratory Analysis of the Titanic Dataset
Feature Engineering
Logistic Regression for Survival Prediction
Using TensorFlow Contrib
Linear SVM for Survival Prediction
Ensemble Method for Survival Prediction – Random Forest
A Comparative Analysis
Summary
Assessments
3. Clustering Your Data – Unsupervised Learning for Predictive Analytics
Unsupervised Learning and Clustering
Using K-means for Predictive Analytics
How K-means Works
Using K-means for Predicting Neighborhoods
Predictive Models for Clustering Audio Files
Using kNN for Predictive Analytics
Working Principles of kNN
Implementing a kNN-Based Predictive Model
Summary
Assessments
4. Using Reinforcement Learning for Predictive Analytics
Reinforcement Learning
Reinforcement Learning in Predictive Analytics
Notation, Policy, and Utility in RL
Policy
Utility
Developing a Multiarmed Bandit's Predictive Model
Developing a Stock Price Predictive Model
Summary
Assessments
A. Assessment Answers
Lesson 1: From Data to Decisions – Getting Started with TensorFlow
Lesson 2: Putting Data in Place – Supervised Learning for Predictive Analytics
Lesson 3: Clustering Your Data – Unsupervised Learning for Predictive Analytics
Lesson 4: Using Reinforcement Learning for Predictive Analytics

TensorFlow: Powerful Predictive Analytics with TensorFlow

Md. Rezaul Karim

TensorFlow: Powerful Predictive Analytics with TensorFlow

Copyright © 2018 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: March 2018

Production reference: 1080318

Published by Packt Publishing Ltd.

Livery Place, 35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78913-691-3

www.packtpub.com

Credits

This book is a blend of text and quizzes, all packaged up keeping your journey in mind. It includes content from the following Packt product:

Predictive Analytics with TensorFlow by Md. Rezaul Karim

Meet Your Expert

We have the best work of the following esteemed author to ensure that your learning journey is smooth:

Md. Rezaul Karim has more than 8 years of experience in the area of research and development with a solid knowledge of algorithms and data structures in C/C++, Java, Scala, R, and Python focusing big data technologies: Spark, Kafka, DC/OS, Docker, Mesos, Zeppelin, Hadoop, and MapReduce and deep learning technologies: TensorFlow, DeepLearning4j, and H2O-Sparking Water. His research interests include machine learning, deep learning, semantic web/linked data, big data, and bioinformatics. He is a research scientist at Fraunhofer FIT, Germany. He is also a Ph.D. candidate at the RWTH Aachen University, Aachen, Germany. He holds a BSc and an MSc degree in computer science. Before joining the Fraunhofer FIT, he had been working as a researcher at Insight Centre for Data Analytics, Ireland. Before that, he worked as a lead engineer with Samsung Electronics' distributed R&D Institutes in Korea, India, Vietnam, Turkey, and Bangladesh. Before that, he worked as a research assistant in the Database Lab at Kyung Hee University, Korea. He also worked as an R&D engineer with BMTech21 Worldwide, Korea. Even before that, he worked as a software engineer with i2SoftTechnology, Dhaka, Bangladesh. He is the author of the following book titles with Packt Publishing:

Large-Scale Machine Learning with SparkDeep Learning with TensorFlowScala and Spark for Big Data AnalyticsPredictive Analytics with TensorFlow

Preface

Predictive analytics discovers hidden patterns from structured and unstructured data for automated decision making in business intelligence. Predictive decisions are becoming a huge trend worldwide, catering to wide industry sectors by predicting which decisions are more likely to give maximum results. Data mining, statistics, and machine learning allow users to discover predictive intelligence by uncovering patterns and showing the relationship between structured and unstructured data.

Machine learning is concerned with algorithms that transform raw data into information and then into actionable intelligence. This fact makes machine learning well suited to the predictive analytics. Without machine learning, therefore, it would be nearly impossible to keep up with these massive streams of information altogether.

What's in It for Me?

Maps are vital for your journey, especially when you're holidaying in another continent. When it comes to learning, a roadmap helps you in giving a definitive path for progressing towards the goal. So, here you're presented with a roadmap before you begin your journey.

This book is meticulously designed and developed in order to empower you with all the right and relevant information on TensorFlow. We've created this Learning Path for you that consists of four lessons:

Lesson 1, From Data to Decisions – Getting Started with TensorFlow, provides a detailed description of the main TensorFlow features in a real-life problem, followed by detailed discussions about TensorFlow installation and configuration. It then covers computation graphs, data, and programming models before getting started with TensorFlow. The last part of the lesson contains an example of implementing linear regression model for predictive analytics.

Lesson 2, Putting Data in Place – Supervised Learning for Predictive Analytics, covers some TensorFlow-based supervised learning techniques from a theoretical and practical perspective. In particular, the linear regression model for regression analysis will be covered on a real dataset. It then shows how you could solve the Titanic survival problem using logistic regression, random forests, and SVMs for predictive analytics.

Lesson 3, Clustering Your Data – Unsupervised Learning for Predictive Analytics, digs deeper into predictive analytics and finds out how you can take advantage of it to cluster records belonging to the certain group or class for a dataset of unsupervised observations. It will then provide some practical examples of unsupervised learning. Particularly, clustering techniques using TensorFlow will be discussed with some hands-on examples.

Lesson 4, Using Reinforcement Learning for Predictive Analytics, talks about designing machine learning systems driven by criticism and rewards. It will show several examples on how to apply reinforcement learning algorithms for developing predictive models on real-life datasets.

What Will I Get From This Book?

Learn TensorFlow features in a real-life problem, followed by detailed TensorFlow installation and configurationExplore computation graphs, data, and programming models also get an insight to an example of implementing linear regression model for predictive analyticsSolve the Titanic survival problem using logistic regression, random forests, and SVMs for predictive analyticsDig deeper into predictive analytics and find out how to take advantage of it to cluster records belonging to the certain group or class for a dataset of unsupervised observationsLearn several examples of how to apply reinforcement learning algorithms for developing predictive models on real-life datasets

Prerequisites

This book is aimed at data analysts, data scientists, and machine learning practitioners who want to build powerful, robust, and accurate predictive models with the power of TensorFlow. Some of the prerequisites that is required before you begin this book are:

Working knowledge of PythonBasic knowledge of TensorFlowBasic knowledge of Math and Statistics

General Overview of TensorFlow

TensorFlow is an open source framework from Google for scientific and numerical computation based on dataflow graphs that stand for the TensorFlow's execution model. The dataflow graphs used in TensorFlow help the machine learning experts to perform more advanced and intensive training on the data for developing deep learning and predictive analytics models. In 2015, Google open sourced the TensorFlow and all of its reference implementation and made all the source code available on GitHub under the Apache 2.0 license. Since then, TensorFlow has achieved wide adoption from academia and research to the industry, and following that recently the most stable version 1.x has been released with a unified API.

As the name TensorFlow implies, operations are performed by neural networks on multidimensional data arrays (aka flow of tensors). This way, TensorFlow provides some widely used and robust implementation linear models and deep learning algorithms.

Deploying a predictive or general purpose model using TensorFlow is pretty straightforward. The thing is that once you have constructed your neural networks model after necessary feature engineering, you can simply perform the training interactively using plotting or TensorBoard (we will see more on it in upcoming sections). Finally, you deploy it eventually after evaluating it by feeding it some test data.

Since we are talking about the dataflow graphs, nodes in a flow graph correspond to the mathematical operations, such as addition, multiplication, matrix factorization, and so on, whereas, edges correspond to tensors that ensure communication between edges and nodes, that is dataflow and controlflow.

You can perform the numerical computation on a CPU. Nevertheless, using TensorFlow, it is also possible to distribute the training across multiple devices on the same system and train on them, especially if you have more than one GPU on your system so that these can share the computational load. But the precondition is if TensorFlow can access these devices, it will automatically distribute the computations to the multiple devices via a greedy process. But TensorFlow also allows the program, to specify which operations will be on which devices via name scope placement.

The APIs in TensorFlow 1.x have changed in ways that are not all backward compatible. That is, TensorFlow programs that worked on TensorFlow 0.x won't necessarily work on TensorFlow 1.x.

The main features offered by the latest release of TensorFlow are: