Book Image

Getting Started with TensorFlow

By : Giancarlo Zaccone
Book Image

Getting Started with TensorFlow

By: Giancarlo Zaccone

Overview of this book

<p>Google's TensorFlow engine, after much fanfare, has evolved in to a robust, user-friendly, and customizable, application-grade software library of machine learning (ML) code for numerical computation and neural networks.</p> <p>This book takes you through the practical software implementation of various machine learning techniques with TensorFlow. In the first few chapters, you'll gain familiarity with the framework and perform the mathematical operations required for data analysis. As you progress further, you'll learn to implement various machine learning techniques such as classification, clustering, neural networks, and deep learning through practical examples.</p> <p>By the end of this book, you’ll have gained hands-on experience of using TensorFlow and building classification, image recognition systems, language processing, and information retrieving systems for your application.</p>
Table of Contents (12 chapters)

Data clustering


A clustering problem consists in the selection and grouping of homogeneous items from a set of initial data. To solve this problem, we must:

  • Identify a resemblance measure between elements

  • Find out if there are subsets of elements that are similar to the measure chosen

The algorithm determines which elements form a cluster and what degree of similarity unites them within the cluster.

The clustering algorithms fall into the unsupervised methods, because we do not assume any prior information on the structures and characteristics of the clusters.

The k-means algorithm

One of the most common and simple clustering algorithms is k-means, which allows subdividing groups of objects into k partitions on the basis of their attributes. Each cluster is identified by a point or centroid average.

The algorithm follows an iterative procedure:

  1. Randomly select K points as the initial centroids.

  2. Repeat.

  3. Form K clusters by assigning all points to the closest centroid.

  4. Recompute the centroid of each cluster...