nemos icon indicating copy to clipboard operation
nemos copied to clipboard

Sparsity

Open BalzaniEdoardo opened this issue 11 months ago • 2 comments

Most of our basis elements (for now all of them except the orthogonal exponential) have limited support, meaning that the support is usually an interval that is smaller then the domain covered by the basis. This will generate a sparse matrix at evaluation.

With product of basis the sparsity will increase even more, as well as if the number of basis increases, so it may be useful to store the evaluated matrix in a sparse format.

BalzaniEdoardo avatar Jul 21 '23 14:07 BalzaniEdoardo

+1, this is exactly why spline bases are popular.

There are some other dense basis functions we should include however, like Fourier.

ahwillia avatar Jul 22 '23 02:07 ahwillia

We'd want to support sparsity on all elements. For example, our spike input could be a list of spike times instead of the binned spike counts. If the total recording time is small enough, we can represent the first as the second with a relatively small bin size, but if the recording is too large we'll run into memory issues. jax has some sparse array support, so investigate whether it can handle this (and whether sparse arrays are supported on GPUs).

billbrod avatar Aug 10 '23 18:08 billbrod