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)


  1. The probability that a person is 1.70 m tall is p(Tall) = 0.75, while the probability that tomorrow it's going to rain is P(Rain) = 0.2. What is the probability P(Tall, Rain)? (that is, the probability that a person is 1.70 m tall and tomorrow it's going to rain).
  2. Given a dataset X, we build an histogram with 1,000 bins and we find that many of them are empty. Why does this happen?
  3. A histogram contains three bins with, respectively 20, 30, and 25 samples. The first bin has a range 0 < x < 2, the second 2 < x < 4, and the third 4 < x < 6. What is the approximate probability that P(x) > 2?
  4. Given a normal distribution N(0, 1), can a sample x with p(x) = 0.35 be considered as an anomaly?
  5. A dataset X with 500 samples has std(X) = 2.5 and IQR(X) = 3.0. What is the optimal bandwidth?
  6. An expert told us that a distribution is extremely peaked around...