News for hackers. Stuff that matters.
Re:Time Series Prediction – A short introduction for pragmat... by wjnc on Saturday November 09, 2019 @02:14PM (#21493607)
And now for the great thing ... Prophet uses Stan underneath [1] and thus is built on foundations of 'regular' Bayesian statistics. Andrew Gelman has written about Prophet as well [2].

After reading this blog I am tempted to get the ML for time series book though. I'd love to try and compare some less than trivial examples with covariates involved.

[1] https://peerj.com/preprints/3190/

[2] https://statmodeling.stat.columbia.edu/2017/03/01/facebooks-...

Re:Time Series Prediction – A short introduction for pragmat... by antman on Saturday November 09, 2019 @03:15PM (#21494034)
A good explanation for prophet that made it click for me was its recreation with python in pymc

https://www.ritchievink.com/blog/2018/10/09/build-facebooks-...

Re:Time Series Prediction – A short introduction for pragmat... by ganeshkrishnan on Saturday November 09, 2019 @04:54PM (#21494650)
Facebook prophet is really impressive and has gotten us better precision with shorter iterations even with large datasets compared to CNN+lstm.

We run it over millions of inventory over years of data and it has given satisfactory results in majority of the cases

Re:Time Series Prediction – A short introduction for pragmat... by ayayecocojambo on Monday November 11, 2019 @12:36AM (#21502428)
have you tried xgboost? in our problems none of the LSTM/Fbrpohpet/arima performed better fine-tuned xgboost model.
Re:Time Series Prediction – A short introduction for pragmat... by ganeshkrishnan on Friday November 15, 2019 @08:05PM (#21550240)
Just looked it up. Looks super interesting, I will surely give it a shot. Thanks
Re:Time Series Prediction – A short introduction for pragmat... by objektif on Saturday November 09, 2019 @04:03PM (#21494339)
Which book are you referring to?
Re:Time Series Prediction – A short introduction for pragmat... by wjnc on Sunday November 10, 2019 @07:44AM (#21497761)
Re:Time Series Prediction – A short introduction for pragmat... by chroem- on Saturday November 09, 2019 @12:44PM (#21492890)
Basis function regression is a very under-appreciated method for producing time series forecasts. I've found that it beats most of the methods described in this article. Maybe I should make a blog post...
Re:Time Series Prediction – A short introduction for pragmat... by starpilot on Saturday November 09, 2019 @09:30PM (#21496033)
Works if you have enough domain knowledge to prescribe the functions (priors). Not so good if it's a poorly understood or niche domain.
Re:Time Series Prediction – A short introduction for pragmat... by amrrs on Saturday November 09, 2019 @12:49PM (#21492927)
Sorry for ignorance. Did you mean to say Simple Linear regression or something else? Do you have any reference for that?
Re:Time Series Prediction – A short introduction for pragmat... by semi-extrinsic on Saturday November 09, 2019 @01:16PM (#21493158)
Not OP, but as an example, imagine you want to fit the time series of measured monthly CO2 at Mauna Loa:

https://www.esrl.noaa.gov/gmd/ccgg/trends/

Just by looking at the graph, you can see that fitting a linear combination of a constant term, t, t2 and sin(w*t) will give you a very accurate model that has five tuning parameters (four weights and one frequency).

Re:Time Series Prediction – A short introduction for pragmat... by chroem- on Saturday November 09, 2019 @12:58PM (#21493001)
Yes, it's an extension of linear regression. You can incorporate different basis functions to model trend, seasonality, the effects of external regressors, different frequency components, etc. It gives you a lot more control over the forecast model.
Re:Time Series Prediction – A short introduction for pragmat... by riyadparvez on Saturday November 09, 2019 @01:11PM (#21493118)
Are you referring to Generalized Additive Models (GAM)?
Re:Time Series Prediction – A short introduction for pragmat... by semi-extrinsic on Saturday November 09, 2019 @01:19PM (#21493188)
I think GAMs are more for the case where you have many underlying input variables and a single resulting response.
Re:Time Series Prediction – A short introduction for pragmat... by XuMiao on Saturday November 09, 2019 @03:04PM (#21493943)
This is a less studied senario for time series research: contextual forecasting. With enough contextual information, forecasting doesn't need to squeeze the information from its own history that hard.
Re:Time Series Prediction – A short introduction for pragmat... by tgv on Saturday November 09, 2019 @02:31PM (#21493720)
Here's an explanation: https://www.youtube.com/watch?v=rVviNyIR-fI

It's basically fitting on non-linear transformations of x.

Re:Time Series Prediction – A short introduction for pragmat... by clircle on Sunday November 10, 2019 @06:07PM (#21500779)
You can fit a basis function regression model with least squares.
Re:Time Series Prediction – A short introduction for pragmat... by platz on Saturday November 09, 2019 @02:19PM (#21493648)
Normally the method for dealing with 'time series' is really just finding ways to turn a non-stationary distribution into a stationary distribution, where you can then apply classic statistical methods on them. So you're just finding ways to factor out the time component in the data so you can use the standard non-time sensitive regression models on the transformed data.

I don't think it's untill you get to the NN based models that they start treating time as a first-class component in the model.

* If I'm wrong please explain why instead of downvoting

Re:Time Series Prediction – A short introduction for pragmat... by k_f on Sunday November 10, 2019 @05:40AM (#21497429)
A (weak) stationary distribution has no trend, no seasonality, and no changes in variance. With these properties, predictions are independent of the absolute point in time. The transformations to turn non-stationary series into stationary ones are reversible (usually differencing, log-transformations and alike), thus the predictions can be applied back to the original time series.

Treating time as a first-class component really just means to factor in the absolute point in time into the models at training time. This only makes sense if the absolute time changes properties of the distribution that cannot be accounted for with regular transformations. If that's the case, then we assume that these changes cannot be modeled, and are thus either random or follow a complicated systematic we can't grasp. In the first case, a NN wouldn't improve either, in the second case, we either need to always use the full history of the time series to make a prediction, or hope that a complex NN like LSTM might capture the systematic.

In any case, I think one of the more compelling reasons to use NN is to not have to do preprocessing. The trade-off is that you end up with a complicated solution compared to the six or so easy-to-understand parameters a SARIMA model might give you. And the latter even might give you some interpretable intuition for the behavior of the process.

Re:Time Series Prediction – A short introduction for pragmat... by anthony_doan on Sunday November 10, 2019 @10:58PM (#21502020)
> I don't think it's untill you get to the NN based models that they start treating time as a first-class component in the model.

They're bad at prediction for the past several m1-m4 time series tournament for univariate. The best one for m4 is a combination of NN and traditional statistical regression (time series) but it is often deem too tailor to the data.

And I don't think differencing out the trend, season, etc... means we're treating the time component as second class. It's just that stationary data is what we know the most currently. There is GARCH/ARCH method too. The nonstationary methods aren't used as often and from the tournaments the current set of time series are the best so far.

So I think this comment is misleading.

There is also longitudinal analysis, survival analysis, etc... and they all keep time in mind.

Re:Time Series Prediction – A short introduction for pragmat... by jldugger on Sunday November 10, 2019 @01:28PM (#21499336)
I'm not sure I agree; in a sense the exponential smoothing approaches deliberately factor in time by looking back in time by the seasonality stride. But yes, the reason it's called triple exponential smoothing is that you're repeatedly transforming the data into a form amenable to classical methods. Zero centering and detrending are exactly that of what you speak. But at the end of all this, you still use these components to produce a prediction.
Re:Time Series Prediction – A short introduction for pragmat... by graycat on Saturday November 09, 2019 @02:58PM (#21493903)
Here are some old references for the problem of the OP:

David R. Brillinger, Time Series Analysis: Data Analysis and Theory, Expanded Edition, ISBN 0-8162-1150-7, Holden-Day, San Francisco, 1981.

George E. P. Box and Gwilym M. Jenkins, Time Series Analysis --- Forecasting and Control: Revised Edition, ISBN 0-8162-1104-3, Holden-Day, San Francisco, 1976.

Brillinger was a John Tukey student at Princeton and long at Berkeley.

Re:Time Series Prediction – A short introduction for pragmat... by hprotagonist on Saturday November 09, 2019 @12:38PM (#21492853)
My very first move with timeseries data is to get to frequency space as fast as I can.
Re:Time Series Prediction – A short introduction for pragmat... by wenc on Saturday November 09, 2019 @06:03PM (#21495101)
Genuinely curious -- how do you create predictive time-series models in the frequency domain?

(background: control systems)

Re:Time Series Prediction – A short introduction for pragmat... by hprotagonist on Sunday November 10, 2019 @09:14AM (#21498012)
speech recognition immediately jumps to mind
Re:Time Series Prediction – A short introduction for pragmat... by wenc on Sunday November 10, 2019 @02:52PM (#21499795)
Speech recognition is generally not considered a time series problem though.
Re:Time Series Prediction – A short introduction for pragmat... by hprotagonist on Monday November 11, 2019 @10:55AM (#21505800)
what about speech is nontemporal?
Re:Time Series Prediction – A short introduction for pragmat... by wenc on Wednesday November 13, 2019 @12:14AM (#21521328)
Time series problems are indeed temporal, but not all temporal problems are time series problems. Time series deals with time-specific features of a discrete sequence like autocorrelation, trends, seasonality, etc. whereas frequency domain methods deal with, well, frequency.

Support you’re are looking at sales patterns over a long period of time, which has certain patterns. FFTs are unlikely to tell you much that is useful or predict much whereas time series methods can reveal patterns where the t is the independent variable.

Re:Time Series Prediction – A short introduction for pragmat... by windsignaling on Saturday November 09, 2019 @05:23PM (#21494842)
In the spirit of the article, how can frequency domain representation be used for prediction / forecasting? Any examples you could share?
Re:Time Series Prediction – A short introduction for pragmat... by 1996 on Saturday November 09, 2019 @12:54PM (#21492968)
+1. FFT is under appreciated.
Re:Time Series Prediction – A short introduction for pragmat... by new2628 on Saturday November 09, 2019 @01:32PM (#21493287)
What do you mean? It's one of the most used algorithm in the history of mankind.
Re:Time Series Prediction – A short introduction for pragmat... by sgillen on Saturday November 09, 2019 @01:42PM (#21493363)
Under appreciated by people just now getting into time series regression, who may be really excited about throwing deep learning at the problem.

Edit: literally saw this happen two weeks ago by a PhD in electrical engineering.

Re:Time Series Prediction – A short introduction for pragmat... by 1996 on Saturday November 09, 2019 @03:12PM (#21494009)
So much that! Also under appreciated: plots and OLS.

Start plotting before firing up the GPUs, then compare to standard OLS - like in this article!

Suggested reading if you don't know OLS: ML from scratch.

Re:Time Series Prediction – A short introduction for pragmat... by dnautics on Saturday November 09, 2019 @06:00PM (#21495085)
Well to be fair if you use a convolutional recurrent architecture, you're doing it without realizing it.
Re:Time Series Prediction – A short introduction for pragmat... by sgillen on Saturday November 09, 2019 @08:49PM (#21495883)
Is that true? I would think that would be more like a wavelet transform where the wavelets are learned?
Re:Time Series Prediction – A short introduction for pragmat... by dnautics on Saturday November 09, 2019 @11:03PM (#21496323)
Yeah, that's true.
Re:Time Series Prediction – A short introduction for pragmat... by hprotagonist on Saturday November 09, 2019 @01:39PM (#21493339)
and not a single DS/ML person seems to have ever heard of it.
Re:Time Series Prediction – A short introduction for pragmat... by teej on Saturday November 09, 2019 @01:42PM (#21493357)
Because most folks in DS/ML are working on predicting likelihood to press a button. You don’t need Fourier transforms for that.
Re:Time Series Prediction – A short introduction for pragmat... by XuMiao on Saturday November 09, 2019 @02:56PM (#21493889)
CNN is essentially a FT with learnable kernels.
Re:Time Series Prediction – A short introduction for pragmat... by hprotagonist on Saturday November 09, 2019 @03:36PM (#21494181)
well, it’s certainly usually convolution. Hardly anyone knows why or how that connects to the FT though.
Re:Time Series Prediction – A short introduction for pragmat... by hprotagonist on Saturday November 09, 2019 @01:53PM (#21493443)
you do, depending on your feature preprocessing.
Re:Time Series Prediction – A short introduction for pragmat... by scottlocklin on Saturday November 09, 2019 @03:50PM (#21494267)
Most DS/ML people are useless chimps.

FWIIW I've used it all the time, along with wavelets, cepstrums, lifters and Hilbert transforms. For timeseries with nonlinearities and lots of data points, it's the way to go. 9/10 times I'd rather hire a EE with signal processing background than a statistician or data scientist for time series work.

Re:Time Series Prediction – A short introduction for pragmat... by objektif on Saturday November 09, 2019 @01:10PM (#21493105)
Can you give an example pls?
Re:Time Series Prediction – A short introduction for pragmat... by hprotagonist on Saturday November 09, 2019 @01:27PM (#21493248)
“bandpass with a butterworth then plot the FFT and phase”
Re:Time Series Prediction – A short introduction for pragmat... by wenc on Saturday November 09, 2019 @06:06PM (#21495128)
If you would indulge me, what sorts of insights would this get you? (genuinely curious)

All I can think of is identification of frequency modes.

Re:Time Series Prediction – A short introduction for pragmat... by ulucs on Sunday November 10, 2019 @05:44AM (#21497437)
I mostly feel these methods are quite overkill for most applications. As a purist, I'd recommend starting out with a simple linear regression and then moving on to adding methods to cover the letters of SARIMA by showing the need for each. It may not be as flashy, but linear regression is a stupidly powerful and very cheap tool for all kinds of situations.
Re:Time Series Prediction – A short introduction for pragmat... by mr_toad on Sunday November 10, 2019 @10:45PM (#21501962)
As a complete non-purist I’d suggest chucking the data into Auto.arima and seeing where that gets you. Not only will it save a lot of time, in my experience it tends to produce better models.

https://cran.r-project.org/web/packages/forecast/index.html

Re:Time Series Prediction – A short introduction for pragmat... by in9 on Monday November 11, 2019 @07:24AM (#21504244)
I saw an article which I can't remember that warned in which contexts auto.arima might not work. But in the majority of times auto.arima outperforms the old Box-Jenkins methodology.
Re:Time Series Prediction – A short introduction for pragmat... by cube2222 on Saturday November 09, 2019 @01:30PM (#21493272)
I really recommend Prophet as an easy to use option like the article says.

I needed anomaly detection for prometheus metrics integrated with grafana for marking "anomalous" regions so the model doesn't learn them.

Took me a week to set it all up including packaging up as a Microservice and deploying.

Re:Time Series Prediction – A short introduction for pragmat... by ayayecocojambo on Monday November 11, 2019 @12:51AM (#21502490)
In the multivariate time series forecasting problem i found out that fine-tuned xgboost (and its variants) performs much better than fbprophet, sarimax, RNN variations. Predicting time series with RNN is like killing a bird for bazooka.
Re:Time Series Prediction – A short introduction for pragmat... by oli5679 on Saturday November 09, 2019 @03:40PM (#21494211)
I really appreciate the philosophy of defining metric, and measuring performance going from simple to complex methods.

I've also used Prophet library, and find it works well out of the box.

Re:Time Series Prediction – A short introduction for pragmat... by TrackerFF on Saturday November 09, 2019 @01:16PM (#21493151)
Gaussian Processes seems to be pretty popular, might want to include that to the comparisons.
Re:Time Series Prediction – A short introduction for pragmat... by sanxiyn on Saturday November 09, 2019 @02:26PM (#21493693)
Gaussian process is marvelous. Demos like https://statmodeling.stat.columbia.edu/2012/06/19/slick-time... just seem magical.
Re:Time Series Prediction – A short introduction for pragmat... by jldugger on Sunday November 10, 2019 @01:35PM (#21499391)
Anyone patched prophet into graphite? Curious if the two are easily combined.
Re:Time Series Prediction – A short introduction for pragmat... by person_of_color on Sunday November 10, 2019 @03:23AM (#21497078)
This is one type of time series, but how about audio time series?