1. Learn
  2. /
  3. Courses
  4. /
  5. Dimensionality Reduction in R

Connected

Exercise

Separating house prices with t-SNE

t-SNE is a non-linear dimensionality reduction technique. It embeds high-dimensional data into a lower-dimensional space. As it does so, it strives to keep points next to their original neighbors. You will create a t-SNE plot that you can compare with the PCA plot in the last exercise. PCA preserves the global structure of the data, but not the local structure. t-SNE preserves the local structure by keeping neighbors in the higher-dimensional space close to each other in the lower-dimensional space. You will see this in the plots.

You will apply t-SNE to reduce the house_sales_df. The target variable of house_sales_df is price. The tidyverse and Rtsne packages have been loaded for you.

Instructions

100 XP
  • Fit t-SNE to house_sales_df using Rtsne().
  • Bind the t-SNE X and Y coordinates to house_sales_df.
  • Plot the t-SNE results using ggplot(), encoding the target variable in color.