Fitting t-SNE to the ANSUR data
t-SNE is a great technique for visual exploration of high dimensional datasets. In this exercise, you'll apply it to the ANSUR dataset. You'll remove non-numeric columns from the pre-loaded dataset df
and fit TSNE
to this numeric dataset.
This exercise is part of the course
Dimensionality Reduction in Python
Exercise instructions
- Drop the non-numeric columns from the dataset.
- Create a
TSNE
model with learning rate 50. - Fit and transform the model on the numeric dataset.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Non-numerical columns in the dataset
non_numeric = ['Branch', 'Gender', 'Component']
# Drop the non-numerical columns from df
df_numeric = df.____(____, axis=____)
# Create a t-SNE model with learning rate 50
m = ____(____)
# Fit and transform the t-SNE model on the numeric dataset
tsne_features = m.____(____)
print(tsne_features.shape)