nupurkmr9/S2M2_fewshot

About UMAP visualization

txw1997 opened this issue · 2 comments

Hello, thanks for your excellent work!

I want to know how to use the UMAP to visualize the feature?

Can you send me a code about this part or some detail about this?

I use the feature extract from the penultimate layer and feed it to the UMAP to reduce to 2 dimensions. But all the point get together, can't distinguish the different classes.

Maybe I set the wrong hyperparameter?

Here is my email: 19120402@bjtu.edu.cn

Expect to your reply, thanks! thanks!

Hi, we ran UMAP with default parameters (with neighourhood size ~ 5-15 ) on the penultimate features of all novel images (600 images of 20 classes in case of miniImageNet). You can also try changing metric to one of 'cosine' or 'euclidean'. I do not have the exact code available right now. If you share the code snippet you are using probably I can help more.

Thanks,
Nupur

@nupurkmr9 Hi author, I am trying to do umap to visualize the features. However, I confront the same issue as the points gets together.
test

Here is my code, could you mind giving me some advice about the hyperparameters for your settings. I appreciate it!

reducer = umap.UMAP(n_neighbors=15, min_dist=0.01)
low_dim_embs = reducer.fit_transform(output_batch_list)