How to model continuous data?

Hello,

I’m modeling temporal data, for e-commerce, it’s typically session openning or conversion (transactions). It’s ponctual data, so I use windows in order to have meaningful curves.
So x axis is time , and y axis is the number of event happening in a given time window.

I managed to model the cyclic nature of such data…

Now I’m searching a way to ‘force’ my model to some kind of continuity. In my mind there is two reason for such continuity :

  • the window is slided from a smaller amount of time that the windows size itself. Then two adjacent windows share common data.
  • I assume that the transaction rate is more or less continuous regarding to time. (I don’t expect big gaps in transaction rate between to adjacent moments)

Telling it in a other way : how can I model the ‘continuity’ between adjacent positions in a distribution array.

Ideally I’d like that this ‘continuity’ model learns the continuity by itself with the smallest asumptions.

Thank for any idea.

Hmm, I don’t have the most complete advice for you, but for some reason I am thinking maybe the new ODE functionality might be able to help you out, because they allow the user to flexibly work with arbitrary times at which data is perceived?

Thanks @Gon_F, this is very interesting, but I don’t think it will help me in pratice.
I guess ODE is a bit overkill for my problem, I’m looking for a simpler trick…

IMO this is best to fit with a Bayesian State Space model, which unfortunately PyMC3 does not have.
Another option is to use a Gaussian process, in a way, the continuous you wanted to capture is encoded in the covariance matrix/kernel.

That is interesting to hear; aren’t Bayesian State Space Models just (more or less) multi-level/hierarchical time-series models, but estimated with Bayesian methods?

Pymc3 can calculate time-series, and is more than flexible enough to handle hierarchical cross-sectional data models, so what is impossible with currently combining the two?

I would like to hear your thoughts on this, junpenglao, if you can spare just a moment.

1 Like

Some part of it yes, but it involves state evolution as well, and if you add autocorrelation, you need to always run a kalmen filter or something similar to aggregate the state transition.

Definitively possible, everything could be implemented with a theano.scan, with appropriate construction of the transitional kernel - it just that we dont have anyone to work on it.

1 Like

Very interesting words, I thought State Space Models were something easy to implement. Thank you for all this detail.

1 Like