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

Use scan to broadcast models fitting along the data axis #10

Open
LegrandNico opened this issue Jan 25, 2023 · 0 comments
Open

Use scan to broadcast models fitting along the data axis #10

LegrandNico opened this issue Jan 25, 2023 · 0 comments
Labels
enhancement New feature or request long term

Comments

@LegrandNico
Copy link
Collaborator

LegrandNico commented Jan 25, 2023

This for loop is slowing model fitting when many datasets/models are provided.

https://github.com/ilabcode/ghgf/blob/8fec5d71e1677e85103ae9dd79dda26056b5b06f/ghgf/distribution.py#L167

We should use scan or for loop instead, but this might require careful refactoring.

It is not clear however if we would get significant performance improvement from this refactoring, if so it might only appear when n is large. Also, it might require uniformizing the shape of the input arrays, which will also come with a cost.

@LegrandNico LegrandNico added this to the 0.01 milestone Jan 25, 2023
@LegrandNico LegrandNico added the enhancement New feature or request label Jan 25, 2023
@LegrandNico LegrandNico modified the milestones: 0.01, 0.0.2 Jan 30, 2023
@LegrandNico LegrandNico removed this from the 0.0.2 milestone Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request long term
Projects
None yet
Development

No branches or pull requests

1 participant