-
Notifications
You must be signed in to change notification settings - Fork 481
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
[SYSTEMDS-3670] Added early-stopping mechanism to tSNE #1990
Conversation
This patch improves the builtin dist function by removing the outer product operator. For 100 function calls on an arbitrary matrix with 4000 rows and 800 cols, the new dist function shortens the runtime from 66.541s to 60.268s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fine addition, there are some minor things to fix before we merge it.
The main thing missing is the testing verification should test for behavior.
I gave a concrete suggestion in the line comment.
best regards
Sebastian
src/test/java/org/apache/sysds/test/functions/builtin/part2/BuiltinTSNETest.java
Outdated
Show resolved
Hide resolved
Hi @ramesesz - thanks for contribution. 😄 ✨ is this good for merge? |
LGTM as well, thanks for the contribution. |
Added a tolerance parameter to tSNE and implemented an early-stopping mechanism based on the L1 norm of the difference. Furthermore I also added a test case, whose setup guarantees that the early-stopping mechanism is triggered.
Without early-stopping, tSNE always runs 1000 iterations (based on the default parameter value). More often than not, this leads to redundant iterations, where changes are minimal. This mechanism is a good addition as it adds a dimension of flexibility to the algorithm.