Book Image

Mastering Predictive Analytics with scikit-learn and TensorFlow

By : Alvaro Fuentes
Book Image

Mastering Predictive Analytics with scikit-learn and TensorFlow

By: Alvaro Fuentes

Overview of this book

Python is a programming language that provides a wide range of features that can be used in the field of data science. Mastering Predictive Analytics with scikit-learn and TensorFlow covers various implementations of ensemble methods, how they are used with real-world datasets, and how they improve prediction accuracy in classification and regression problems. This book starts with ensemble methods and their features. You will see that scikit-learn provides tools for choosing hyperparameters for models. As you make your way through the book, you will cover the nitty-gritty of predictive analytics and explore its features and characteristics. You will also be introduced to artificial neural networks and TensorFlow, and how it is used to create neural networks. In the final chapter, you will explore factors such as computational power, along with improvement methods and software enhancements for efficient predictive analytics. By the end of this book, you will be well-versed in using deep neural networks to solve common problems in big data analysis.
Table of Contents (7 chapters)

Core concepts in TensorFlow

There are some major concepts that we need to understand before actually using the tensorflow library. The following are the concepts that we will cover in this book:

  • Tensors
  • Computational graphs
  • Sessions
  • Variables
  • Placeholders
  • Constants

Tensors

A tensor is the central unit of data in TensorFlow. A tensor consists of a set of primitive values shaped into an array of any number of dimensions. It is basically a multidimensional array similar to a NumPy array. The number of dimensions defines the rank of a tensor. Let's see some of the following examples:

  • 3: If we have a single number, the tensor will be considered a rank 0 tensor. This can be a scalar with shape[].
  • [2., 2., 1.]: If we have...