RJT1990 / pyflux

Open source time series library for Python
BSD 3-Clause "New" or "Revised" License
2.11k stars 240 forks source link

Cythonization #5

Open RJT1990 opened 8 years ago

RJT1990 commented 8 years ago

Now that a core model set is available, it is time to look to optimize the code to allow for quicker estimation and scalability to larger datasets.

Model

Inference

RJT1990 commented 8 years ago

For this task the main bottleneck to optimize are the recursions within _model(). For each model:

ARIMA - the ma recursion GARCH - the entire recursion GAS - the entire recursion GAS Regression - the entire recursion GP-NARX - no recursions here Gaussian state space - the kalman filter/smoother recursions Non-Gaussian state space - should be fine VAR - the covariance matrix construction

BBVI - the outer for loop MH - the outer for loop

springcoil commented 8 years ago

https://github.com/jakevdp/cython_template might be useful

RJT1990 commented 8 years ago

That's really useful - seems like the right way to go to ensure Cython isn't mandatory for users. Can't wait to get stuck into this once I've got the other stuff out of the way.

RJT1990 commented 8 years ago

Tried that template out tonight - works a treat. Will have first Cythonized version this weekend!

springcoil commented 8 years ago

Cool. Glad it worked.

On 19 Jul 2016 9:55 PM, "Ross Taylor" notifications@github.com wrote:

Tried that template out tonight - works a treat. Will have first Cythonized version this weekend!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/RJT1990/pyflux/issues/5#issuecomment-233762696, or mute the thread https://github.com/notifications/unsubscribe-auth/AA8DiLVY2xLSmn8GbKTcDc9tNZt9p_PFks5qXTmygaJpZM4I3I-b .

RJT1990 commented 8 years ago

Update after recent release:

RJT1990 commented 8 years ago

Update: GAS and GASReg models to undergo further Cythonization this weekend.

RJT1990 commented 8 years ago

GAS models Cythonized further - will be in next release; speedups of 1.5-2x.