CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Dimensionality Reduction in Python

Afficher le cours

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.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de 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)
Modifier et exécuter le code