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

Add explained variance based scheduler #104

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

myshkov
Copy link
Contributor

@myshkov myshkov commented Feb 19, 2024

Add a new slicing scheduler that is based on the cumulative explained variance from the PCA. Includes a cleanup of the dimensions handling methods.

@myshkov myshkov requested a review from nailimixaM February 19, 2024 15:49
cum_var = np.cumsum(np.array(eigen_vals)) / np.sum(eigen_vals)
dim = np.argmax(cum_var > 1 - self.uev_threshold)
dim -= dim % self.round_interval
dim = int(dim)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth having the round_interval parameter passed to slicing schedulers in general, to ensure they always return dims that are rounded accordingly? I guess the constant and function schedulers could ask for constants/functions that take the rounding interval into account already, but what about this scheduler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants