Skip to content
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

Merged
merged 10 commits into from
Feb 9, 2024

Conversation

ramesesz
Copy link
Contributor

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.

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.
@ramesesz ramesesz changed the title [MINOR] Added early-stopping mechanism to tSNE [SYSTEMDS-3670] Added early-stopping mechanism to tSNE Jan 26, 2024
Copy link
Contributor

@Baunsgaard Baunsgaard left a 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

scripts/builtin/tSNE.dml Outdated Show resolved Hide resolved
scripts/builtin/tSNE.dml Outdated Show resolved Hide resolved
scripts/builtin/tSNE.dml Outdated Show resolved Hide resolved
@j143 j143 added this to the systemds-3.2.0 milestone Feb 8, 2024
@j143 j143 requested a review from phaniarnab February 8, 2024 13:25
@j143
Copy link
Contributor

j143 commented Feb 8, 2024

Hi @ramesesz - thanks for contribution. 😄 ✨

is this good for merge?

@ramesesz
Copy link
Contributor Author

ramesesz commented Feb 8, 2024

Hi @ramesesz - thanks for contribution. 😄 ✨

is this good for merge?

Hi @j143, yes its ready for merge :)

@Baunsgaard
Copy link
Contributor

LGTM as well, thanks for the contribution.

@j143 j143 merged commit 60a2acb into apache:main Feb 9, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants