September 2019
Intermediate to advanced
420 pages
10h 29m
English
First, let's generate a 2D dataset containing four distinct blobs. To emphasize that this is an unsupervised approach, we will leave the labels out of the visualization:
In [1]: import matplotlib.pyplot as plt... %matplotlib inline... plt.style.use('ggplot')
In [2]: from sklearn.datasets.samples_generator import make_blobs... X, y_true = make_blobs(n_samples=300, centers=4,... cluster_std=1.0, random_state=10)... plt.scatter(X[:, 0], X[:, 1], s=100);
This will generate the following ...
Read now
Unlock full access