Book Image

Hands-On Unsupervised Learning with Python

By : Giuseppe Bonaccorso
Book Image

Hands-On Unsupervised Learning with Python

By: Giuseppe Bonaccorso

Overview of this book

Unsupervised learning is about making use of raw, untagged data and applying learning algorithms to it to help a machine predict its outcome. With this book, you will explore the concept of unsupervised learning to cluster large sets of data and analyze them repeatedly until the desired outcome is found using Python. This book starts with the key differences between supervised, unsupervised, and semi-supervised learning. You will be introduced to the best-used libraries and frameworks from the Python ecosystem and address unsupervised learning in both the machine learning and deep learning domains. You will explore various algorithms, techniques that are used to implement unsupervised learning in real-world use cases. You will learn a variety of unsupervised learning approaches, including randomized optimization, clustering, feature selection and transformation, and information theory. You will get hands-on experience with how neural networks can be employed in unsupervised scenarios. You will also explore the steps involved in building and training a GAN in order to process images. By the end of this book, you will have learned the art of unsupervised learning for different real-world challenges.
Table of Contents (12 chapters)

Anomaly Detection

In this chapter, we are going to discuss a practical application of unsupervised learning. Our goal is to train models that are either able to reproduce the probability density function of a specific data-generating process or to identify whether a given new sample is an inlier or an outlier. Generally speaking, we can say that the specific goal we want to pursue is finding anomalies, which are often samples that are very unlikely under the model (that is, given a probability distribution p(x) << λ where λ is a predefined threshold) or quite far from the centroid of the main distribution.

In particular, the chapter will comprise of the following topics:

  • A brief introduction to probability density functions and their basic properties
  • Histograms and their limitations
  • Kernel density estimation (KDE)
  • Bandwidth selection criteria
  • Univariate example...