[SYSTEMDS-3670] Added early-stopping mechanism to tSNE#1990
Merged
j143 merged 10 commits intoapache:mainfrom Feb 9, 2024
Merged
[SYSTEMDS-3670] Added early-stopping mechanism to tSNE#1990j143 merged 10 commits intoapache:mainfrom
j143 merged 10 commits intoapache:mainfrom
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.
Baunsgaard
reviewed
Jan 28, 2024
Contributor
Baunsgaard
left a comment
There was a problem hiding this comment.
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
Member
|
Hi @ramesesz - thanks for contribution. 😄 ✨ is this good for merge? |
Contributor
Author
Contributor
|
LGTM as well, thanks for the contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.