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.
Published by Packt Publishing Ltd.
Birmingham B3 2PB, UK.
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 Spark
- Deep Learning with TensorFlow
- Scala and Spark for Big Data Analytics
- Predictive 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:
, 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.
, 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.
, 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.
, 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 configuration
- Explore computation graphs, data, and programming models also get an insight to an example of implementing linear regression model for predictive analytics
- Solve the Titanic survival problem using logistic regression, random forests, and SVMs for predictive analytics
- Dig 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 observations
- Learn 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 Python
- Basic knowledge of TensorFlow
- Basic knowledge of Math and Statistics
Chapter 1. From Data to Decisions Getting Started with TensorFlow
Despite the huge availability of data and significant investments, many business organizations still go on gut feel because they neither make the proper use of the data nor do they take appropriate and effective business decisions. TensorFlow, on the other hand, can be used to help take the business decision from this huge collection of data. TensorFlow is mathematical software and an open source software library for Machine Intelligence, developed in 2011 by the Google Brain Team and it can be used to help us analyze data to predict the effective business outcome. Although the initial target of TensorFlow was to conduct research in machine learning and in deep neural networks, however, the system is general enough to be applicable in a wide variety of other domains as well.