How it works...

The functionality is as follows:

  1. The t-SNE algorithm is a non-linear dimensionality reduction technique. Computers are easily able to interpret and process many dimensions during their computations. However, humans are only capable of visualizing two or three dimensions at a time. Therefore, these dimensionality reduction techniques come in very handy when trying to draw insights from data.

 

  1. On applying t-SNE to the 300-dimensional vectors, we are able to squash it into just two dimensions to plot it and view it.
  2. By specifying n_components as 2, we let the algorithm know that it has to squash the data into a two-dimensional space. Once this is done, we add all the squashed vectors into one giant matrix named all_word_vectors_matrix ...

Get Apache Spark Deep Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.