aesara-devs / aemcmc

AeMCMC is a Python library that automates the construction of samplers for Aesara graphs representing statistical models.
https://aemcmc.readthedocs.io/en/latest/
MIT License
39 stars 11 forks source link

Make `aemcmc` compatible with sparse data input #22

Closed rlouf closed 2 years ago

rlouf commented 2 years ago

We noticed in #19 that aemcmc samplers did not work with sparse tensors as an input. This seems to be related to the implementation of the @ operator in Aesara (https://github.com/aesara-devs/aesara/issues/881) which, unlike aesara.tensor.dot, seems to only work with dense tensors.

In this PR we replace every instance of @ with aesara.tensor.dot, and add a test to make sure that sparse matrices can be used as inputs to horseshoe_nbinom and horseshoe_logitstic. Closes #19.

rlouf commented 2 years ago

Closing for now. It is not high priority and it will become pointless once https://github.com/aesara-devs/aesara/issues/886 is closed in aesara. Better spend that time and energy on aesara itself or more important issues here.