Skip to Main Content
TensorFlow: Powerful Predictive Analytics with TensorFlow
book

TensorFlow: Powerful Predictive Analytics with TensorFlow

by Md. Rezaul Karim
March 2018
Intermediate to advanced content levelIntermediate to advanced
164 pages
3h 39m
English
Packt Publishing
Content preview from TensorFlow: Powerful Predictive Analytics with TensorFlow

Using K-means for Predictive Analytics

K-means is a clustering algorithm that tries to cluster related data points together. However, we should know its working principle and mathematical operations.

How K-means Works

Suppose we have n data points, xi, i = 1...n, that need to be partitioned into k clusters. Now that the target here is to assign a cluster to each data point, K-means aims to find the positions, μi, i=1...k, of the clusters that minimize the distance from the data points to the cluster. Mathematically, the K-means algorithm tries to achieve the goal by solving an equation that is an optimization problem:

How K-means Works

In the previous equation, ci

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

TensorFlow Machine Learning Projects

TensorFlow Machine Learning Projects

Ankit Jain, Dr. Amita Kapoor
Machine Learning Using TensorFlow Cookbook

Machine Learning Using TensorFlow Cookbook

Alexia Audevart, Konrad Banachewicz, Luca Massaron

Publisher Resources

ISBN: 9781789136913Supplemental Content