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 sparse matrices if cov_type='poisson' #108

Open
jvavrek opened this issue Aug 11, 2020 · 1 comment
Open

Use sparse matrices if cov_type='poisson' #108

jvavrek opened this issue Aug 11, 2020 · 1 comment

Comments

@jvavrek
Copy link

jvavrek commented Aug 11, 2020

It would be nice to take advantage of sparse matrix multiplication when cov_type='poisson'. With 100 cause and 100 effect bins I find that about 80% of compute time is spent in

mixer.get_MC_err()  # unfold.py line 214

and about 85% of that time is spent doing

Vc1 = dcdP.dot(CovPP).dot(dcdP.T)  # mix.py line 242

Of course, due to the rapid scaling of the problem, these will get much more expensive going up to even say 200 bins each. But if the covariance is poisson, the covariance should be sparse, and a full dot product over the full [nbins^2 x nbins^2] matrix is not necessary.

@jvavrek
Copy link
Author

jvavrek commented Aug 31, 2020

see #109

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

No branches or pull requests

1 participant