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 reproducible code for matrix exponential simulations #37

Merged
merged 8 commits into from
Jul 22, 2024

Conversation

SamDuffield
Copy link
Contributor

Reproducible code for the experiments in https://arxiv.org/abs/2311.12759

Copy link
Contributor

@KaelanDt KaelanDt left a comment

Choose a reason for hiding this comment

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

Looks good! I would also add the plots in the repo (what we did for other examples)

examples/matrix_exponentials/run.py Outdated Show resolved Hide resolved


D = [64, 128, 256, 512]
ERR_abs = np.zeros((args.n_repeats, len(D), NT))
Copy link
Contributor

Choose a reason for hiding this comment

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

mixing uppercase and lowercase not very clean

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed ERR to err, I think the rest is ok

return A_wishart


def orthogonal(d: int, _) -> jnp.ndarray:
Copy link
Contributor

Choose a reason for hiding this comment

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

why the second _ argument?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unified signature with wishart but ortho_group is a scipy function that doesn't use jax random keys



def wishart(d: int, key: random.PRNGKey) -> jnp.ndarray:
n = 2 * d # degrees of freedom
Copy link
Contributor

Choose a reason for hiding this comment

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

Comments seem a bit random in the scripts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this one is ok haha have cleaned up run.py

@SamDuffield SamDuffield merged commit ccd6b73 into main Jul 22, 2024
2 checks passed
@SamDuffield SamDuffield deleted the examples/martrix-exponential branch July 22, 2024 11:45
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