Skip to Content
Hands-On Unsupervised Learning with Python
book

Hands-On Unsupervised Learning with Python

by Giuseppe Bonaccorso
February 2019
Intermediate to advanced
386 pages
9h 54m
English
Packt Publishing
Content preview from Hands-On Unsupervised Learning with Python

Estimating the density

Once a kernel function has been selected, it's possible to build a complete approximation of a probability density function using a k-nearest neighbors approach. In fact, given a dataset X (for simplicity, X ∈ ℜm, so the values are real numbers), it's easy to create, for example, a ball-tree (as discussed in Chapter 2, Clustering Fundamentals) to partition the data in an efficient way. When the data structure is ready, it's possible to obtain all the neighbors of query point xj inside a radius defined by the bandwidth. Let's assume that such a set is Xj = {x1, ..., xt} and the number of points is Nj. The estimation of the probability density is obtained as follows:

It's not difficult to prove that, if the bandwidth ...

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

Hands-On Unsupervised Learning Using Python

Hands-On Unsupervised Learning Using Python

Ankur A. Patel
Introduction to Machine Learning with Python

Introduction to Machine Learning with Python

Andreas C. Müller, Sarah Guido

Publisher Resources

ISBN: 9781789348279Supplemental Content