我正在运行一个程序,使用 t-sne 将 MNIST 数据的维度从 784-dim 减少到 2-dim。
该程序需要很长时间才能完成,我想使用 tqdm 进度条跟踪进度。
我想知道如何使用 t-sne 功能添加 tqdm 进度条。tqdm 在循环中运行良好。
我不知道如何将其用于功能。
# TSNE
from sklearn.manifold import TSNE
# Picking the top 1000 points as TSNE takes a lot of time for 15K points
data_1000 = standardized_data[0:30000,:]
labels_1000 = labels[0:30000]
# configuring the parameteres
# the number of components = 2
# default perplexity = 30
# default learning rate = 200
# default Maximum number of iterations for the optimization = 1000
model = TSNE(n_components=2, random_state=0, perplexity=200,n_iter=5000)
# I want to keep track of progress for function
tsne_data = model.fit_transform(data_1000)