Exercise

Understanding t-SNE output

The most important t-SNE output are those related to the K-L divergence of the points in the original high dimensions and in the new lower dimensional space. Remember that the goal of t-SNE is to minimize the K-L divergence between the original space and the new one.

In the returned object, the itercosts structure indicates the total cost from the K-L divergence of all the objects in each 50th iteration and the cost structure indicates the K-L divergence of each record in the final iteration.

The Rtsne package and the tsne_output object have been loaded for you.

Instructions 1/2

undefined XP
  • 1

    Inspect the structure of tsne_output. Then, show the total costs after each 50th iteration and plot them using type="l".

  • 2

    Adapt the previous code and show the K-L divergence of each record at the final iteration and plot them.