Trực quan hóa t-SNE cho dữ liệu nhiều chiều

Giảm Chiều Dữ Liệu với Python

Jeroen Boeye

Head of Machine Learning, Faktion

t-SNE trên tập IRIS

cụm iris

Giảm Chiều Dữ Liệu với Python

t-SNE trên tập IRIS

cụm iris 1 có chú thích

Giảm Chiều Dữ Liệu với Python

t-SNE trên tập IRIS

cụm iris 3 có chú thích

Giảm Chiều Dữ Liệu với Python

t-SNE trên ANSUR nữ

df.shape
(1986, 99)
non_numeric = ['BMI_class', 'Height_class', 
               'Gender',  'Component', 'Branch']

df_numeric = df.drop(non_numeric, axis=1)

df_numeric.shape
(1986, 94)
Giảm Chiều Dữ Liệu với Python

Huấn luyện t-SNE

from sklearn.manifold import TSNE

m = TSNE(learning_rate=50)
tsne_features = m.fit_transform(df_numeric)

tsne_features[1:4,:]
array([[-37.962185,  15.066088],
       [-21.873512,  26.334448],
       [ 13.97476 ,  22.590828]], dtype=float32)
Giảm Chiều Dữ Liệu với Python

Gán đặc trưng t-SNE cho tập dữ liệu

tsne_features[1:4,:]
array([[-37.962185,  15.066088],
       [-21.873512,  26.334448],
       [ 13.97476 ,  22.590828]], dtype=float32)
df['x'] = tsne_features[:,0]

df['y'] = tsne_features[:,1]
Giảm Chiều Dữ Liệu với Python

Vẽ t-SNE

import seaborn as sns

sns.scatterplot(x="x", y="y", data=df)

plt.show()
Giảm Chiều Dữ Liệu với Python

Vẽ t-SNE

đám mây điểm ansur

Giảm Chiều Dữ Liệu với Python

Tô màu theo nhóm BMI

import seaborn as sns
import matplotlib.pyplot as plt

sns.scatterplot(x="x", y="y", hue='BMI_class', data=df)

plt.show()
Giảm Chiều Dữ Liệu với Python

Tô màu theo nhóm BMI

đám mây điểm ansur theo BMI

Giảm Chiều Dữ Liệu với Python

Tô màu theo nhóm BMI

đám mây điểm ansur theo BMI có chú thích

Giảm Chiều Dữ Liệu với Python

Tô màu theo nhóm chiều cao

import seaborn as sns

import matplotlib.pyplot as plt

sns.scatterplot(x="x", y="y", hue='Height_class', data=df)

plt.show()
Giảm Chiều Dữ Liệu với Python

Tô màu theo nhóm chiều cao

đám mây điểm ansur theo chiều cao

Giảm Chiều Dữ Liệu với Python

Tô màu theo nhóm chiều cao

đám mây điểm ansur có chú thích kép

Giảm Chiều Dữ Liệu với Python

Ayo berlatih!

Giảm Chiều Dữ Liệu với Python

Preparing Video For Download...