New answers tagged

2

The residuals from your model are not random as one can "see" a change in the mean possibly at year 2 period 4 effectively identifying the need for deterministic structure of some form . This data set requires a hybrid model containing memory (ARIMA) and deterministic structure. I will present the "logic" in identifying this model. Following this discussion ...


0

Ok I realised that we just need to substitute: $$ \alpha = 2\theta_1 - \theta_2 \\ \beta = -\theta_1 + \theta_2 $$ although I do not quite understand what was the reasoning behind this particular substitution.


0

My thoughts are to check the amplitude of the: ACF autocorrelation function PACF partial autocorrelation function Fourier Coefficients (Fourier Coefficients are related to ACF via Wiener-Khinchin theorem.)


0

Are the sites connected to each other, or can you neglect spatial interactions ? If you can neglect it, just start with fixed effect models with time and site dummies (plus a variable with the other kind of birds). If not, look at spatial regressions.


0

I'm pretty sure I answered this question before. The answer depends on how you define a better forecast. If you define it as minimizing expected loss (forecast error) then the average will be better for minimizing the square of an error and the median minimizes the absolute value of an error both in expected sense. Suppose your loss function is $f(y-\hat y)$...


2

Assuming you are fitting the regression with ARIMA error model using arima(), Arima() or auto.arima(), the estimation is done in one step, not two as you describe. That is, the regression coefficients are estimated simultaneously with the ARMA coefficients. If you are studying the effect of the exogenous variables, you are much better off using a regression ...


0

The residuals from your model will suggest possible augmentations. Ultimately your final model will be .....thus future values are expected to be 80% of the most recent plus 100% of the value 12 periods ago minus 80% of the value 13 periods ago PLUS 6.56 . Thus the forecast is quite dependent on seasonal factors i.e. what occurred 12 & 13 periods ago. ...


0

Discrete coordinates shouldn't be a problem since you can easily map them into [0;1]x[0;1]. Using any recurrent network would be fine (including LSTM), however, I suggest you look into an attention mechanism instead of LSTM which could be beneficial in your case. As input you set mapped sequence of x,y from [0;1]x[0;1] as output you get a vector of current ...


1

Of course we don't want divergence of the gradient. Neither (1) nor (3) are desirable. However, in practice, the sequences are always finite and one can scale down the gradient norm (which is the clipping trick) and avoid the divergence issue for most intents and purposes. Again, you have to realize that the gradient will not be very large all the time, but ...


0

I assume by sigmas you mean the variances of the components of the kernel functions. If you want to choose them in the light of your CS, then that sounds Bayesian to me. How are you setting the length scales? There is a literature on priors for Gaussian process parameters, eg Trangucci, Betancourt, Vehtari (2016).


0

I prefer option 1 where you will predict the next 72 hours at once with all the history and future data (like the forecast). I do not see why option 2 would outperform option 1 in theory. And yes, it is doable. Take a look at this paper.


3

You might also consider the drivers behind 'Deep-learning-beats-all' trend you mention. Much of the hype around these techniques comes from the superiority of these methods in image recognition and natural language problems. These domains are defined by exceptionally large datasets (e.g. ImageNet > 14 million images, it's possible to find very large text ...


0

The documentation for ctsem says it can handle time-dependent and time-independent exogenous variables. Here is some of the documentation, there is much more. Hierarchical Bayesian Continuous-Time Dynamic Modeling https://www.researchgate.net/publication/310747801_Hierarchical_Bayesian_Continuous_Time_Dynamic_Modeling See page 6. Subject level latent ...


0

It is important to know thy assumptions . As you quoted "I chose to use Prophet, an algorithm recently published by Facebook, accounting for weekly and monthly seasonalities, and simple linear growth" . Simple linear growth assumptions can have serious consequences as in this case. The problem with this if there is a simple level shift in your data this ...


0

You can always model your time series using any non-time-series model you like, including nonlinear or nonparametric regression, then model the time series of residuals using a standard (or other) time series method. This is the approach taken in R's forecast::auto.arima(), which runs a standard OLS regression with ARIMA errors.


0

How would you fit ARIMA model with lots of autocorrelations? discusses the need for anthropogenic variables (deterministic input series) rather than using memory or sines & cosines ( see Is Prophet from Facebook any different from a linear regression? for a discussion along these lines) in building models. I have seen very successful applications where ...


2

RNNs are most commonly used as density models over some space of sequences. To be more precise, if we have some sequence $X = x_1, x_2, \ldots, x_k$ then our model describes the distribution $$P(X) = \prod_{i=1}^k p(x_i | x_{<i})$$ (which is valid by the product rule). More specifically, our RNN models each conditional term $p(x_i | x_{<i})$ as $x_i \...


1

DTW does not have a notion of "convergence", as it is not an iterative optimization procedure. When DTW is too slow, and doesn't finish in acceptable time, the obviously next best idea is to use bounded DTW. Full DTW can take O(nm) time of n and m are the lengths of your series (at least if implemented well...). You can bound this to O(nk) for a fixed ...


0

I tried this approach and I think is very useful for filling the gaps in missing data of a numeric variable. The same approach can be used to have some control over numeric data noise (i.e by fitting a suitable polynomial degree to noisy data) where the model can then be used to generate a cleaner data for the same feature.


2

Granted that a single observation may not tell you everything you'd like to know, but continuing from @AdamO's Comment, information from one occurrence may be useful. Now you know that overheating can happen. You might assume that such events happen according to a Poisson process with rate $\lambda$ so that times between events are exponential with rate $\...


2

Your reviewer is (maybe) right, but he/she kind of cherrypicked his comparison point. First, why a maybe. Even if two data points are in the 95% interval of each other, their difference might be significantly different at a 5% margin. See: https://towardsdatascience.com/why-overlapping-confidence-intervals-mean-nothing-about-statistical-significance-...


0

Just to answer your questions about including the lagged variables - Yes, this can be done and we did this recently for a model where we had to capture time variance but also have a number of other predictors tested in the model. We were using weekly data and used last 4 weeks of observed weekly data as lag1 - lag4 variables in the data and these helped the ...


2

You question is almost meaningless without showing/explaining the data. The tells you want invarinces you need (phase. offset, amplitude, uniform scaling, warping, complexity etc [a]). But see for example [b] [a] https://www.cs.ucr.edu/~eamonn/Complexity-Invariant%20Distance%20Measure.pdf [b] https://www.cs.ucr.edu/~eamonn/time_series_bitmaps.pdf


2

THE BIG PRINT: Since the ACF is dominant i.e.has the most significant values the process is autoregressive (AR) . The order of the AR model is determined by the # of significant values in the subordinate structure ... in this case the PACF .. thus 2. The answer is (2,0,0) THE LITTLE PRINT: When does this simple strategy work ... 1) When there are no ...


1

This fall into the realm of time-varying covariates, and what you describe is the functional form that is indeed of importance. Based on the description of your problem I would say that the cumulative effect of calcium intake could be a candidate functional form. Another aspect that you will also need to consider is whether the time-varying covariate is ...


0

By exponential decay you mean 100*(1-exp r t)? Then divide by 100, subtract 1 and take logs. Now you can do a linear regression on t. But as mentioned you can add polynomial or spline terms .. eg your model could be 100*(1-exp(at + b t^2))


0

interpreting the observed ACF and PACF an trying to match them to a candidate ARIMA model requires that the data under analysis has no 1) step/level shifts 2) deterministic time trends 3) pulses 4) seasonal pulses AND that the resultant AIMA model has constant parameters and constant error variance over time thus one needs to simultaneously consider ...


0

A lot can be done with a simple linear regression but not all that Prophet does. Just one example, you can specify your own change point candidate for a trend, and Prophet will use it as a prior.


2

There are really 3 cases one might consider: (1) the longer-term gradients vanish (2) they explode (3) they neither vanish nor explode somehow. The problem with case (1) is that shorter-term gradients, being added to longer-term gradients, then dominate exponentially the longer-term ones, making it difficult to learn long-term dependencies. Furthermore, in ...


1

Adding to the first comment, I would recommend you to have it as channels. i.e. whole data becomes 3 dimensional, which can be still processed by deep learning models. Let me put it clear, Dimension 1 - rows Dimension 2 - Sensors Dimension 3 - Location so your data will look something like this [[[38, 38, 35, 33, 32], [18, 18, 12, 11, 09]], [[33, ...


0

You have a multivariate data set with one dependent series (multivariate-single equation). VAR is inappropriate when you have only 1 dependent series i.e. equation because you only have have 1 endogenous variable to predict. You might find the following tutorial interesting reading https://autobox.com/pdfs/regvsbox-old.pdf . The solution for this problem ...


1

A time series can have 1) short term arima structure ; 2) seasonal arima structure ; 3) seasonal deterministic structure ; 4) one or more level/step shifts ; 5) one or more deternnistic trends ; 6) one or more pulses ; 7) changes in model parameters over time ; 8) changes in model error variance over time. Are these the kinds of inferential features that ...


1

Statitical tools applied to time series forecasting are very developed and approach-oriented methods. You find many technics arima sarima sarimax var varimax vecm.... And each method had been developed for a particular situation and type of data and serie. In the other hand DNN such as RNN, LSTM.. Are challenging models that have not been very used in this ...


8

You can't meaningfully talk about DNNs or ARIMA being "better at time series forecasting". It depends enormously on what kind of series you are looking at: short vs. long series, many vs. few or only one related series, causal drivers or not etc. Anyone who makes sweeping statements here is like a salesman who knows exactly what kind of car you need - ...


0

You may have gotten it by searching GOOGLE for "REILLY-WEI TIME SERIES" pointing to a readable text book on time series analysis. The CCF data that you showed is from the classic GASX-GASY example suggesting using to identify starting model. You might also have seen it here http://viewer.zmags.com/publication/9d4dc62a#/9d4dc62a/66 where AUTOBOX ( a ...


0

Here are a few ideas: I think that maybe the problem lies in the formulation of the question, and what is an active user. What comes to mind when hearing active user might be more linked to frequency and regularity. Thus you have 4 kinds of positives: the loyal users with regularity, the loyal users without regularity, the churners, and the new active ...


1

I'd recommend creating a dataset that contains one record per student. For each record, you have the target variable (aka the label): 1/0 to indicate whether they responded 'Yes' or 'No' to the survey question. Then you can do some feature negineering to create attributes for each student. The model would take the following form: $$ logit\ E(Y_i)=\alpha+\...


2

Let's start with a generalization. Suppose the original data are a series of values $\mathbf{x}=(x_1, x_2, \ldots, x_n)$ associated with times $\mathbf{t}=(t_1, t_2, \ldots, t_n).$ You have in mind a new set of ordered times indexed by the integers $\mathbf Z$ along with a function $f(k, \mathbf{t}, \mathbf{x})$ that determines what new value to assign to ...


12

The issue here is to get to an equation that parses the observed data to signal and noise. If your data is simple then your regression approach might work. Care should be taken to understand some of the assumptions that they are making with Prophet. You should better understand what Prophet does do, as it doesn't just fit a simple model but attempts to add ...


0

You are missing the change points, piecewise linear splines, which can be implemented in linear models. You are right that at least in the limiting case it's a linear regularised regression (L1 and L2 regularisation). Note that there is a separate prophet model, logistic growth. Also you are assuming the seasonal factors are additive, but they also ...


8

I have not used it, but this is their preprint's abstract (emphasis mine): Forecasting is a common data science task that helps organizations with capacity planning, goal setting, and anomaly detection. Despite its importance, there are serious challenges associated with producing reliable and high quality forecasts — especially when there are a ...


1

To answer your main question: Multilevel TimeSeries modelling in Python There is nothing equivalent to the HTS package in Python. The two things that I know of that are the closest are PyAF and htsprophet. However they use different forecasting models than those used in HTS. PyAF uses models from scikit-learn to do forecasting, which is unusual since ...


0

Develop your daily model taking into account day-of-the-week, day-of-the-month, lead and lag effects around holidays, level shifts, monthly effects, time trends etc. . Now forecast out 1 period and generate a family of possible values say 1000.. call that simulation1 allowing for possible pulses to occur. Now do that for period 2 while incorporating ...


0

Turns out the answer is simpler than expected. Consider the conditional form of the likelihood function is (still conditioning on $y_0$) \begin{align*} L(y) &= \frac{1}{ ( \sqrt{2 \pi \sigma^2} )^n } e^{-\frac{1}{2\sigma^2} ( \sum_{t = 1}^T (y_t - \rho y_{t-1})^2)}. \\\\ \end{align*} As in the case of linear model $$ \sum_{t = 1}^T (y_t - \rho y_{t-1})^...


1

Of course you can but I suggest you to go with ARIMAX because when having hourly data, you won't be able to reach seasonnality effect so go with dummy variables for season effect for example or target a certain period of the time. 1.bis I don't know why you want to fit 336 ARIMA models for each hour ? You just do 1 model and then you do a prevision for t+h ...


1

You seem to be looking for a prediction-interval, not a confidence-interval. There is a difference. The simplest approach would be to regress the European numbers on the US numbers and use established formulas for regression PIs. Maybe work on a log scale, since you anticipate a multiplicative relationship. (Note that you need a bias correction in back-...


0

Censoring is not "partial death". I think you are confusing the property of the sample (some have died) with the property of an individual (one has almost died). Those who are censored didn't have the event so they are as alive as they were at baseline. Ending your observation of survival after a particular (calendar) time is called administrative ...


1

If you are correctly incorporating day-of-the-week, day-of-the month, month, quarter, lead & contemporaneous & lag holiday effects and step/level shifts and local time trends AND accommodating one-time pulses and possible changes in day-of-the-week effects you probably only need (if any) short term arima structure. If your model requires some 30 lags ...


1

2) Should be Conduct Intervention on residuals from Step 1 If an intervention affects X and Y it is not an intervention . if an intervention affects Y GIVEN the effect of X it is an intervention.


0

Whether conditioning on specific $X$ regimes makes sense is conceptually independent of whether you only observe a small subset of your actual outcome. It may make sense (or not) whether you are predicting "far" or "soon" out of your training sample. So, by all means, if you believe it makes sense, then try it. However, don't expect magic from this model. ...


Top 50 recent answers are included