Skip to content

New Induced Matrix Distribution: Approximate Leverage Scores #82

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

Closed
wants to merge 13 commits into from

Conversation

VChristian
Copy link
Contributor

@VChristian VChristian commented Jan 17, 2025

Summary

Implementation of a new induced matrix distribution using the approximate leverage scores of the matrix.

Method

Let row_distribution = true and $A \in \mathbb{R}^{n \times d}$. Let $\Pi_1 \in \mathbb{R}^{r_1 \times n}$ be a $\epsilon$-Fast Johnson-Lindenstrauss Transform, and $\Pi_2 \in \mathbb{R}^{d \times r_2}$ be an $\epsilon$-Johnson-Lindenstrauss Transform. In the reference, $\Pi_1$ is formed by the subsampled randomized hadamard transform and an example distribution for $\Pi_2$ is introduced in section 2.2.

Let the SVD of $\Pi_1A = U \Sigma V^\intercal$ and let $R^{-1} = V \Sigma^{-1}$. Then, define

$$\Omega = AR^{-1}\Pi_2,$$

which is the matrix that will be used to construct the distribution. In particular, given $\Omega$ the probability weight assigned to the $i^{th}$ row of $A$ is

$$||\Omega[i, :]||_2^2/||\Omega||_F^2.$$

If row_distribution = false, the same computation is carried out on $A^\intercal$.

Changes

The method is implemented under linear_samplers/induced_distributions, and is composed of two methods.

  1. _approximate_leverage_scores takes as input a matrix A, and two sketching methods, and returns $\Omega$.
  2. approximate_leverage_scores_distribution takes as input A, two sketching methods, and a boolean flag, and returns a distribution using the approximate leverage scores. approximate_leverage_scores_distribution calls _approximate_leverage_scores.
  3. Testing files and documentation update

Closes #63

@VChristian VChristian added the enhancement New feature or request label Jan 17, 2025
@VChristian VChristian self-assigned this Jan 17, 2025
@vp314
Copy link
Contributor

vp314 commented Feb 24, 2025

This formulation does not play well with v0.1. We should leave it for v0.2.

@vp314 vp314 closed this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Approximate Leverage Score Sampling
2 participants