Skip to Content
Hands-On Automated Machine Learning
book

Hands-On Automated Machine Learning

by Sibanjan Das, Umit Mert Cakmak
April 2018
Beginner to intermediate content levelBeginner to intermediate
282 pages
6h 52m
English
Packt Publishing
Content preview from Hands-On Automated Machine Learning

t-SNE in action

You can also try t-SNE to visualize high-dimensional data. First, TSNE will be applied to the original data:

# TSNEfrom sklearn.manifold import TSNEtsne = TSNE(verbose=1, perplexity=40, n_iter=4000)tsne = tsne.fit_transform(df)

Output in the console is as follows:

[t-SNE] Computing 121 nearest neighbors...[t-SNE] Indexed 569 samples in 0.000s...[t-SNE] Computed neighbors for 569 samples in 0.010s...[t-SNE] Computed conditional probabilities for sample 569 / 569[t-SNE] Mean sigma: 33.679703[t-SNE] KL divergence after 250 iterations with early exaggeration: 48.886528[t-SNE] Error after 1600 iterations: 0.210506

Plotting the results is as follows:

plt.scatter(tsne[:, 0], tsne[:, 1], c=data.target, cmap="winter", edgecolor="None", ...
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

Automated Machine Learning

Automated Machine Learning

Adnan Masood
R: Unleash Machine Learning Techniques

R: Unleash Machine Learning Techniques

Raghav Bali, Dipanjan Sarkar, Brett Lantz, Cory Lesmeister

Publisher Resources

ISBN: 9781788629898Supplemental Content