Questions tagged [moving-window]
A window is a fixed-length subset of consecutive observations of a time series. The window is moved along the time series at a constant rate. AKA "rolling window".
108 questions
1
vote
0
answers
82
views
Counting occurrences using n-grams
I was asked to do the following exercise:
Consider the sequence
IROIRDXMIRDOMORIORMTDMMDMWBIRQGDM
Count the number of occurences of IRDM using:
n-grams
...
3
votes
1
answer
1k
views
Computation of multiple linear OLS regression with rolling window and/or update
How can I efficiently calculate an OLS fit for N multiple variables for a rolling window?
I've worked out how to do it for 1 and 2 variable linear fits, I'd like to extend to the general case of N ...
2
votes
1
answer
230
views
What is the relationship between average of a rolling intercept and the intercept from a regression over the entire period?
If i calculate rolling (e.g. 3 periods back) intercepts for a time series using OLS, is the average of these rolling intercepts then in some way related to the intercept from an OLS of the entire ...
2
votes
1
answer
68
views
Ranking with multiple weights/ features
We have entities where every entity has start ($s_i$) and end ($e_i$) times and count $c_i$.
An entity is important if its interval ($e_i - s_i$) is large and if its $c_i$ is large.
Here's what I ...
2
votes
1
answer
6k
views
ARIMA + Rolling Window
I'm currently working on building an ARIMA+GARCH model using R. My dataset consists of the logarithmic returns of the Dow Jones index for a period of 11 years 2005-2016, however, it's worth noting ...
1
vote
1
answer
428
views
How does the sliding window work?
I am not sure how the "Sliding window" method work.
Let's assume I have a dataset of number of logins by hour.
a) A window of 24hours to predict the next 24h?
b) A window of 24h to predict the next ...
1
vote
0
answers
609
views
What is the difference between a discrete and continuous rolling window?
What I have read so far suggests that a discrete rolling window is say a yearly window, calculating somethig every year, which is from 01-01/31-12 and a continuous rolling window is a window that ...
2
votes
1
answer
837
views
How to compute the change of Ridge regression solution when one row of data changes?
I understand that $\boldsymbol{\beta} = (X^TX + \lambda I)^{-1}X^T\mathbf{
Y}$ is the closed form solution of Ridge regression.
So sometimes, when I run a rolling window, meaning everytime I run the ...
1
vote
0
answers
748
views
How to make predictions on sliding window?
I need help understanding how to construct sliding windows as well as how to perform final prediction. Any help is appreciated!
I have a dataset from sensing data with multiple features aggregated ...
0
votes
1
answer
5k
views
What is rolling mean and standard deviation in terms of stationarity?
I would like to know what a rolling mean and rolling S.D means in terms of achieving stationairty concerning a time series?
I ran an ADF test and it told me my time series was stationary however, by ...
1
vote
0
answers
47
views
Classify time series with unequal lenghts [closed]
I have a set of time series sensor measurements (acceleration and gyroscope readings) for driving events (harsh acceleration, harsh brake …) with the type, start and end of each event.
I need to ...
1
vote
0
answers
115
views
Average time series forecast errors from cross-validation with rolling origin
I'm calculating the MAPE and RMSE over a rolling origin cross-validation with fixed forecast interval for several models. For example, for a daily series with 3 years, I'm training my model with 2 ...
2
votes
2
answers
1k
views
Rolling Window Forecasting with ARIMAX while supplying actual values
I am comparing different exogenous variables in how good they support the forecast of the monthly seasonal adjusted unemployment rate. All my data is monthly (2006-01-01 until 2018-09-01) and ...
9
votes
1
answer
15k
views
How to decide moving window size for time series prediction?
I have a model to predict +1 day ahead of this time series.
Looking at the chart you can notice some seasonality every 5 days. I suspect using a moving window as training set could help me making a ...
2
votes
2
answers
335
views
DNN methodology and feature concatenation
I'm using someone else's job and I have a question that I cannot solve.
This work uses a DNN to match an electrical resistance to a bend angle. This is not very important, just for the context.
So, ...
2
votes
1
answer
643
views
Impact of window size on estimated volatility using SMA or EWMA
When calculating volatility (either using an SMA or EWMA approach), what impact does the window size have on the volatility estimate?
2
votes
1
answer
282
views
Markov Switching GARCH - Expanding or Rolling window forecasting?
When modelling volatility do people tend to use expanding or sliding windows to predict the performance of MS GARCH models?
3
votes
0
answers
300
views
What are the potential problems with a rolling regression?
I have two time series that co-move, say a currency and a commodity, and the currency is highly impacted by the commodity, but also other factors. I'd like to determine when the currency becomes too ...
2
votes
2
answers
262
views
Rolling sum of 2 sample KS test results
In order to compare two lists of samples from 'before-treatment' and 'after-treatment', I am doing a two sample KS test using the ks_2samp function from Python's scipy.stats package which gives me the ...
0
votes
1
answer
367
views
Moving window time series
I am working on some computations for large datasets of market data and I was wondering is there is a simple way to apply the following logic without using heavy looping. I will simplify the problem:
...
2
votes
1
answer
41
views
Using a recoded window 10 days back in a GAM-model, is that a double whammy or is it OK to do?
I'm formulating a prediction in a logistic reression type in a GAM model.
...
2
votes
2
answers
1k
views
Supervised learning: setting labels on sliding windows of sensor data
Suppose that I have a set of accelerometer data collected with one sensor and one label for each measured data point. These labels describe different states of my system e.g., $state_A, state_B, ...
2
votes
1
answer
2k
views
Detrending using moving average
In Terrence C. Mills book Im currently reading The Foundation of Modern Time Series Analysis on while discussing Person's detrending methods, he mentions the following result.
... Concider the ...
1
vote
0
answers
47
views
How to perform windowframing for timeseries prediction
I am working on a market prediction project based on the timeseries data. Essentially i am trying to windowframe the data and predict whether the price goes up or down in an hour, 30 minutes and 15 ...
0
votes
0
answers
433
views
Rolling window AR(2)-GARCH(1,1) VaR intuition query
I have an AR(2)-GARCH(1,1) model and I need to use a 1-day rolling window 1 -step ahead forecasts to calculate the 5% conditional VaR.
I know how to calculate the VaR for 1-step ahead only - I ...
1
vote
0
answers
57
views
Critique my method for predicting easter product sales from daily data
I hope this question benefits the site as well as myself. Thanks ahead for your time.
So I work for a company that sells (among a lot of things) personalized items specifically for Easter - stuffed ...
2
votes
0
answers
55
views
Picking the right prediction model
I am having a hard time trying to make/pick a prediction model in R.
The data: I have information on 40 different players, with all their recorded performances(training loads) over the last season. ...
2
votes
1
answer
439
views
Time Series: relating duration of one time series to events
I have a stats question, and not enough experience to even begin to know how to find the answer. It's a time series question relating two time series:
A = anomolous conditions (-,0,+) --- continuous ...
0
votes
1
answer
1k
views
Difference between 'Time domain features' and 'frequency domain features'?
I have a time series data of accelerometer in X,Y,Z axis. Data is not sampled at a constant sampling rate(but is close to 100 Hz). In the paper I am referring, it mentions that for feature selection I ...
1
vote
0
answers
104
views
How to use rasters in R to create a logit model?
I created land-use rasters for the city of Montreal for 2012, 2014, and 2016; all of which I converted from vectors to rasters in QGIS. I want to create a logit model to predict land-use changes. I ...
1
vote
0
answers
531
views
How to handle/preprocess time dependent features in a neural network
I want to use a neural network to model a biological continuous variable. This variable depends on a bunch of events that happened in the preceding hours, sometimes up to 24 hours, including the ...
2
votes
0
answers
303
views
Use sliding window to find variance for seasonal time series in R
I would like to estimate the variance of a time series. Say, if the time series has a period of 24, and I want to estimate the variance using
$$ \sigma_t^2 = \frac{1}{2k+1} \sum^k_{-k} (y_{t+24k} - \...
11
votes
4
answers
7k
views
Tuning an exponential moving average to a moving window mean?
The alpha parameter of an exponential moving average defines the smoothing that the average applies to a time series. In a similar way, the window size of a moving window mean also defines the ...
4
votes
2
answers
7k
views
Selecting ARIMA Order using Rolling Forecast
I'm wondering if a rolling forecast technique like the ones mentioned in Rob Hyndman's blogs, and the example below, could be used to select the order for an ARIMA model?
In the examples I've looked ...
1
vote
1
answer
4k
views
Rolling forecasts: training versus forecast accuracy evaluation
Questions:
Are rolling forecast examples (like the ones below) only useful for evaluating a model's accuracy, or can a rolling forecast be used to train a model?
Are models trained using a rolling ...
0
votes
1
answer
876
views
Question about rolling forecast horizon
I'm trying to understand how the rolling forecast example below from Rob Hyndman's blog works. In the final line of the for loop, is ...
4
votes
1
answer
2k
views
Are rolling forecasts more accurate that full-sample forecasts?
I compared the auto.arima forecast checkts below to the rolling forecast fc and noticed ...
1
vote
0
answers
1k
views
Sliding window with labelled time series of sensor data
I'm using a sliding window to obtain features (like mean, varianve etc) of a labelled time series of sensor readings. The goal is to train a binary classifier (like linear regression or SVM) to detect ...
4
votes
0
answers
179
views
improve performance of finding rolling window maximum likelihood
There is data indexed by time:
$$
D_1, D_2, D_3, ..., D_T
$$
I have a model that I assume the parameter $\theta_t$ changes with time $t$.
As a result, I adapt a rolling window strategy:
$$
\theta_{...
3
votes
0
answers
443
views
Good book / resource for learning about moving window PCA?
I would like recommendations on textbooks (or online resources) covering MWPCA theoretically and with application examples (preferably in R, but also in Python, Mathematica, Matlab).
A brief intro:
...
4
votes
1
answer
4k
views
Moving window PCA vs local PCA vs kernel PCA vs rolling PCA
All all these terms mean the same thing?
Are there other terms for MWPCA?
Are there any decent online references to theory and applications?
Which term is most popular (if they are equivalent)?
I'm ...
0
votes
1
answer
946
views
Forecast evaluation for rolling forecast [closed]
I have rolling forecast for each month. I would like to do some forecast evaluation. How do I do this?
6
votes
2
answers
4k
views
How can I estimate the sliding window standard deviation of a stream?
I am processing a stream of database records. At current levels, about 250 million records are added per week, but this will increase. I wish to compute the 90-day sliding window standard deviation of ...
6
votes
1
answer
1k
views
Benchmarking time series forecasting model
Problem: I'm building a time series forecasting model for daily data wherein, the aim is to forecast for the next one week. So, to validate the model, I'm using a moving window based validation ...
0
votes
1
answer
131
views
Reference for the use of moving upper quartile window
I used a moving upper quartile window to select some data, but I require some kind of reference justifying its use and I cannot find anything suitable for it. Does anyone know of a book/paper that ...
3
votes
0
answers
2k
views
Difference between recursive and rolling window estimation
I am trying to check if my Auto Regressive Distributed Lag (ARDL) model provides stable estimates over time. I am not sure if I should be using a recursive or rolling window method. I know that the ...
9
votes
3
answers
19k
views
How to determine moving window size?
I am using moving window technique for data analysis...
For example I compute the mean, the standard deviation and etc. for a given window.
And I wonder if there's any good criterion to determine ...
0
votes
0
answers
26
views
Online moving median [duplicate]
So I can use "EWMA" (1) to update an estimate of the mean as each new measurement is received.
If I know the window size of the smooth($\eta$), the previous estimate($ \bar{x}_t$), and the new ...
0
votes
1
answer
916
views
How to format multi-row time series data for LIBSVM regression
I would have expected this to be covered in detail by the LIBSVM tutorial but after hours of wasting time googling for answers I've had to throw in the towel. What I am trying to do is rather trivial ...
3
votes
0
answers
382
views
Correcting for multiple testing on non-independent sliding windows
Question
Values taken from adjecent windows in a sliding windows are corrolated. If I calculate a p-value from each window, how can I correct for the fact I have tested many windows, given that the ...