-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Rebase of barnes-hut TSNE #4887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
57c3f06
to
8fabe50
Compare
4dafbbb
to
2366fcb
Compare
If this implements a transform method, it should inherit from |
I'm trying this pull request out just to see if it does reduce memory and am not having any luck. This is the code I'm using, you'll see that my data is pretty conservative:
This eats up 32GB ram in short order, I'm pretty sure I applied the pull request correctly otherwise method='barnes_hut' would throw an error no? I was under the impression that the barnes hut implementation was much more memory friendly, am I correct? Edit: this is on Windows 64bit |
@gatapia in principle yes, this PR unfortunately not. There is still work to be done to use sparse matrices to reduce the memory footprint. In the current form, it "only" speeds up the computation about one or two orders of magnitude. Any help with going to sparse matrices is very welcome. |
7ebf045
to
141cf52
Compare
I'd really like to have this in 0.17. I removed the |
On 5 classes of the digits its a factor of 2, on all classes it's a factor of 3, for the s-curve it's a factor of 10. |
Not sure I'm entirely convinced the new example says a lot, though. |
checks pass :) I'm thinking about polishing or removing the faces example, otherwise this should be good. |
+1: either simplify it to only keep the best / fastest performing model or just remove it (a polished version can be re-added later). |
In particular it's important to have some explanation that analyze and explain the obtained results: are they good, is the identity or the pose of faces preserved by the 2D embedding? Here it's not very clear to me. |
what do you think about the rest? |
I think it's already a good improvement upon what we currently have in master. We can work on the memory usage fix in another PR. |
+1 for merge once the face example is removed (or simplified and explained). |
OK I'll remove it for now and merge. |
Renamed example file & added comments FEAT Barnes-Hut t-SNE Vectorized the math calls -- 3x faster on neg grad Draft of n-dimensional barnes-hut; failing tests Tests pass, error being computed in cython Added error calculation to pos gradient Changed cases where points are very close to be clearer Clearer variable names
371ab10
to
1ab64d5
Compare
1ab64d5
to
fe49161
Compare
Trying to rebase #4025.