sg-dev / pathpy

pathpy is an OpenSource python package for the analysis of time series data on networks using higher-order and multi-order graphical models.
GNU Affero General Public License v3.0
2 stars 0 forks source link

Performance Issues with layer_likelihood (sparse matrix representation) #50

Open verginer opened 6 years ago

verginer commented 6 years ago

The layer_likelihood function in tests has a bottleneck the indexing of the transition matrix https://github.com/sg-dev/pathpy/blob/595fc2d497b7446112ad34c562582d57079f6656/pathpy/classes/multi_order_model.py#L473-L480

Some stats changing the type of sparse matrix used:

dense lil csr csc
layer_likelihood 2.8 3.5 10 27
estimate_order 16.8 17.6 24 42
with instantiation 29.1 30 41 51
IngoScholtes commented 6 years ago

Kamino cloned this issue to uzhdag/pathpy