March 2020
Beginner to intermediate
352 pages
8h 40m
English
Now, let's plot the clusters on the graph. We will start plotting using Principal Component Analysis (PCA) since it is good at capturing the global structure of the data. Then, we will use t-Distributed Stochastic Neighbor Embedding (TSNE) to plot the graph as it is good at capturing the relationship with the neighbors. Let's get started:
clusters = MiniBatchKMeans(n_clusters=4, init_size=1024, batch_size=2048, random_state=20).fit_predict(text)
max_label = max(clusters)max_items = np.random.choice(range(text.shape[0]), size=3000, replace=True) ...
Read now
Unlock full access