Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Applied Unsupervised Learning with Python

You're reading from   Applied Unsupervised Learning with Python Discover hidden patterns and relationships in unstructured data with Python

Arrow left icon
Product type Paperback
Published in May 2019
Publisher
ISBN-13 9781789952292
Length 482 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Aaron Jones Aaron Jones
Author Profile Icon Aaron Jones
Aaron Jones
Benjamin Johnston Benjamin Johnston
Author Profile Icon Benjamin Johnston
Benjamin Johnston
Christopher Kruger Christopher Kruger
Author Profile Icon Christopher Kruger
Christopher Kruger
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Chapter 1
2. Introduction to Clustering FREE CHAPTER 3. Chapter 2
4. Hierarchical Clustering 5. Chapter 3
6. Neighborhood Approaches and DBSCAN 7. Chapter 4
8. Dimension Reduction and PCA 9. Chapter 5
10. Autoencoders 11. Chapter 6
12. t-Distributed Stochastic Neighbor Embedding (t-SNE) 13. Chapter 7
14. Topic Modeling 15. Chapter 8
16. Market Basket Analysis 17. Chapter 9
18. Hotspot Analysis Appendix

Introduction to k-means Clustering

Hopefully, by now, you can see that finding clusters is extremely valuable in a machine learning workflow. However, how can you actually find these clusters? One of the most basic yet popular approaches is by using a cluster analysis called k-means clustering. k-means works by searching for K clusters in your data and the workflow is actually quite intuitive – we will start with the no-math introduction to k-means, followed by an implementation in Python.

No-Math k-means Walkthrough

Here is the no-math algorithm of k-means clustering:

  1. Pick K centroids (K = expected distinct # of clusters).
  2. Randomly place K centroids anywhere amongst your existing training data.
  3. Calculate the Euclidean distance from each centroid to all the points in your training data.
  4. Training data points get grouped in with their nearest centroid.
  5. Amongst the data points grouped into each centroid, calculate the mean data point and move your...
You have been reading a chapter from
Applied Unsupervised Learning with Python
Published in: May 2019
Publisher:
ISBN-13: 9781789952292
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Banner background image