Coder Social home page Coder Social logo

Comments (11)

linqiaozhi avatar linqiaozhi commented on June 16, 2024

I finally went ahead and implemented this in my fork. I tried it on a simple example, but not yet on MNIST. Can you please try it out and if it works as expected I will merge to the main repo.

from fit-sne.

linqiaozhi avatar linqiaozhi commented on June 16, 2024

Here's a simple test:

from fast_tsne import fast_tsne
from sklearn import datasets
import numpy as np
import matplotlib.pyplot as plt

SEED = 37

data = datasets.load_digits()
embed_df_1 = fast_tsne(data.data, df = 1, map_dims = 1, seed = SEED)
embed_df_05 = fast_tsne(data.data, df = .05, map_dims = 1, seed = SEED)

x = np.random.rand(data.data.shape[0]) 
fig, axs = plt.subplots(2)
axs[0].scatter(embed_df_1,x,  c=data.target)
axs[1].scatter(embed_df_05,x, c=data.target)
fig.show()

image

from fit-sne.

dkobak avatar dkobak commented on June 16, 2024

Great! I will give it a try during next week.

from fit-sne.

dkobak avatar dkobak commented on June 16, 2024

Sorry, was a bit overwhelmed with stuff. Hoping to try it out this week...

from fit-sne.

dkobak avatar dkobak commented on June 16, 2024

I have finally gave it a try. I tried embedding full MNIST in 1D with various value of df. It seems to work as expected, so I guess you can go ahead and merge into master! Great that you found time to implement it.

One thing I was surprised to see, is that I did not observe any effect until I decreased df much below .5. For 2D, df=.5 was already producing a very strong effect.

mnist1d

And the same but rescaled horizontally:

mnist1d_rescaled

from fit-sne.

dkobak avatar dkobak commented on June 16, 2024

Another thing, is that digits don't split like they do in 2D, but rather the gaps between digits increase...

from fit-sne.

dkobak avatar dkobak commented on June 16, 2024

Also, didn't in 2D the embedding typically grow in size with decreasing df? Here the size decreases when df decreases below 1...

from fit-sne.

dkobak avatar dkobak commented on June 16, 2024

Hey, what do you think? Are you planning to merge this branch? Or do you want to investigate anything first?

from fit-sne.

linqiaozhi avatar linqiaozhi commented on June 16, 2024

Thanks for all the extensive testing, @dkobak. These are interesting differences between the 2D and 1D. I don't have an explanation for them, but I don't think it's due to a bug.

I went ahead and merged the fork.

from fit-sne.

dkobak avatar dkobak commented on June 16, 2024

Cool. I will add my above tests to the example Python notebook.

from fit-sne.

dkobak avatar dkobak commented on June 16, 2024

Added to the example notebook.

from fit-sne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.