pdfcoffee

soumyasankar99
from soumyasankar99 More from this publisher
09.05.2023 Views

Chapter 10TensorFlow Embedding APITensorFlow also offers an Embedding API where one can find and visualize PCAand tSNE [1] clusters using TensorBoard. You can see the live PCA on MNISTimages here: http://projector.tensorflow.org. The following image isreproduced for reference:Figure 1: A visualization of a principal component analysis, applied to the MNIST datasetYou can process your data using TensorBoard. It contains a tool called EmbeddingProjector that allows one to interactively visualize embedding. The EmbeddingProjector tool has three panels:• Data Panel: It is located at the top left, and you can choose the data, labels,and so on in this panel.• Projections Panel: Available at the bottom left, you can choose the type ofprojections you want here. It offers three choices: PCA, t-SNE, and custom.[ 379 ]

Unsupervised Learning• Inspector Panel: On the right-hand side, here you can search for particularpoints and see a list of nearest neighbors.Figure 2: Screenshow of the Embedding Projector toolK-means clusteringK-means clustering, as the name suggests, is a technique to cluster data, that is, topartition data into a specified number of data points. It is an unsupervised learningtechnique. It works by identifying patterns in the given data. Remember the sortinghat of Harry Potter fame? What it is doing in the book is clustering—dividing new(unlabeled) students into four different clusters: Gryffindor, Ravenclaw, Hufflepuff,and Slytherin.Humans are very good at grouping objects together; clustering algorithms tryto give a similar capability to computers. There are many clustering techniquesavailable, such as Hierarchical, Bayesian, or Partitional. K-means clustering belongsto partitional clustering; it partitions the data into k clusters. Each cluster has acenter, called the centroid. The number of clusters k has to be specified by the user.The k-means algorithm works in the following manner:1. Randomly choose k data points as the initial centroids (cluster centers)2. Assign each data point to the closest centroid; there can be different measuresto find closeness, the most common being the Euclidean distance[ 380 ]

Chapter 10

TensorFlow Embedding API

TensorFlow also offers an Embedding API where one can find and visualize PCA

and tSNE [1] clusters using TensorBoard. You can see the live PCA on MNIST

images here: http://projector.tensorflow.org. The following image is

reproduced for reference:

Figure 1: A visualization of a principal component analysis, applied to the MNIST dataset

You can process your data using TensorBoard. It contains a tool called Embedding

Projector that allows one to interactively visualize embedding. The Embedding

Projector tool has three panels:

• Data Panel: It is located at the top left, and you can choose the data, labels,

and so on in this panel.

• Projections Panel: Available at the bottom left, you can choose the type of

projections you want here. It offers three choices: PCA, t-SNE, and custom.

[ 379 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!