Questions tagged [time-series]
A Time series is a sequence of data points with values measured at successive times (either in continuous time or at discrete time periods). Time series analysis exploits this natural temporal ordering to extract meaning and trends from the underlying data.
13,728
questions
0
votes
0
answers
6
views
Warning from GAM predicting deaths from weather time series data: ti(time) vs ti(year, day_of_year) in mgcv
I am getting the following warning when running a generalised additive model (GAM) with the R package mgcv:
Warning in newton(lsp = lsp, X = G$X, y = G$y, Eb = G$Eb, UrS = G$UrS, L = G$L, :
Fitting ...
0
votes
0
answers
5
views
DDQN Policy gives always static Q-value and static action when the input data is different
I am working on Finance data(Time series Data) which has 13k dataset and it has discrete action space 12 where I am using the Double DQN network as a RL algorithm and for policy, LSTM architecture ...
0
votes
0
answers
4
views
Is there an R package including a function for the fractional integration test of Demetrescu, Kuzin and Hassler (2008)?
Question as stated in the title.
The fractional integration test is proposed by Demetrescu, M., Kuzin, V., & Hassler, U. (2008). Long memory testing in the time domain. Econometric Theory, 24(1), ...
2
votes
0
answers
15
views
auto_ts: How to change forecasted date range in auto_ts
I am trying to forecast values using auto_ts library, the input i am passing is a date format which has first date of every month like 2021-11-01 whereas the forecasted values has a date range as last ...
1
vote
1
answer
19
views
xarray:plot missing values
I am plotting some time series that are xarray object but I have data only for May-October.
The result is this straight line:.
Do you have any idea how to remove the dates from the x-axis that are not ...
-1
votes
0
answers
6
views
Save and query data of viewers of live streams (TSDB?)
I am working on a backend service to save data of a live streaming services viewership to make it queryable for later analytics and live viewer counts.
Every edge server delivers the current connected ...
0
votes
0
answers
9
views
Scale data for LSTM models in time series
I am developing an LSTM model to predict energy consumption and would like to scale my data. To do this, I applied transformations to the function that splits the dataset into training and test, as ...
0
votes
0
answers
11
views
How to feed multiple training sets (which are with the same time series) into a machine learning model for training
Machine learning is completely new to me. I now have two targets which should be achieved with machine learning and some time-varying parameter of the district heating system (like mass flow, ...
-2
votes
0
answers
22
views
HOW TO FIND LJUNG-BOX TEST IN R [closed]
res=residuals(model)
plot(res)
acf(res)
pacf(res)
Box.test(model$residuals,lag = 15,type = "ljung-box")
Error in match.arg(type) :
'arg' should be one of “Box-Pierce”, “Ljung-Box”
-3
votes
0
answers
17
views
Why all RandomForestRegressor produce identical predictions? [closed]
I am trying to use Random Forest Regressor for time series forecasting for one feature dataset.
Unfortunately, all predictions have the same value despite the varying input. definitely, I am missing ...
0
votes
0
answers
5
views
VAR - Timeseries
I am building a timeseries prediction model using Vector Auto Regression Model. I am getting this error when I am trying to fit this model:
x contains one or more constant columns. Column(s) 14, 15 ...
1
vote
1
answer
33
views
One-Step ahead Forecasting with Prophet in R
I have built a custom function to do one-step-ahead forecasting using Prophet in R. But my code is not working don't know what is the problem. I have taken the rolling window size of 100 and trained ...
1
vote
1
answer
20
views
Plot Arima: Actual vs Predicted
I have built an Arima model and want to visualise the actual vs predicted. I have made a custom function for plotting the actual and predicted to see how the old and new values are distributed over ...
0
votes
0
answers
5
views
Why do GLS and ML estimators coincide for the estimation of a VAR(p) model?
When estimating the coefficients in a VAR(p) model, the coefficient estimators using GLS and MLE coincide. Could anyone explain why this is the case?
0
votes
1
answer
18
views
Training set and ARIMA plot isn't working?
I'm trying to plot my training data using ARIMA with a dataset that has the dates from 2021/02/28 - 2022/03/22. But when I plot my training ARIMA, it plots 2021-2022, leaves a gap in the graph and ...
0
votes
0
answers
10
views
how to remove these error of time series forecasting
library(readxl)
export1 <- read_excel("C:/Users/Hazeeb/OneDrive/Desktop/data-export/export1.xlsx")
View(export1)
class(export1)
[1] "tbl_df" "tbl" "...
0
votes
0
answers
32
views
Can't plot my time series data and training data on the same graph, with different colours?
Im trying to plot both the original data and my training data on the same graph with this code:
timeseries <- ts(df$new_cases_per_million, start=c(2021,2), end=c(2022,3), frequency=52)
ts_train <...
1
vote
0
answers
18
views
How to rescale a cosine function and superimpose it on another plot?
I have a time series plot - the x-axis is Date (Jan 2005-April 2022), and the y-axis is Rate (-100%-100%). There are already two lines in this plot. I would like to plot a cosine function with a cycle ...
0
votes
0
answers
9
views
DCC-garch simulation not stationary?
I am trying to replicate some outcomes from Becker et al.(2015). To recover table 2, I need to simulate returns from the DCC-Garch model. The parameters and unconditional values(matrices) have been ...
0
votes
0
answers
8
views
darts library gridsearch , BlcokRNNmodel
Hi I want to do gridsearch for my BlockRNN model using darts library . can you please help how I can fix the error .
enter image description here
0
votes
3
answers
25
views
Convert dataframe to time series
Is there a way to convert dataframe to time series (same like mdeaths)
df1 <- structure(list(Year = c(2021, 2022, 2020, 2021, 2022, 2020, 2021,
2020, 2021, 2020, 2021, 2020, 2021, 2020, 2021, 2020,...
0
votes
1
answer
47
views
Time series Forecasting with Daily values
I am doing forecasting with auto.Arima with uni-variate data but my forecast is not correct. I have used all the steps correctly but the point forecast value is not coming out to be right. Please help ...
0
votes
0
answers
14
views
Mongo Restore fails to restore time series collection with the same name
I have a timeseries collection in mongodb liveSamples collection, I'm trying to dump some documents from this collection and then restore it later with mongorestore to the same time series collection ...
1
vote
0
answers
40
views
How to aggregate a categorical variable with 20 levels in hierarchical/ grouped forecasting and use it at external regressor
Fellow contributors,
I have been working with a hierarchical time series, concerning a set of identical products in a number of stores. For this purpose when we aggregate the data set based on 2 ...
1
vote
0
answers
15
views
Moving window size for time series analysis : Minimum description length and Fractal data dimension
I'm doing the time-series analysis as a hobby and am attempting to discover the optimal window size. After some study, I found 2 techniques that had been mentioned on the internet:
MDL (minimum ...
0
votes
0
answers
11
views
Subset df by N rows having Timestamps in Python
I have a long dataframe from which I want to subset a range of rows (size = 60) and do some operations using for-loop iteration.
If not the above, based on the 'Timestamps' col (type is timestamp), I ...
0
votes
1
answer
33
views
How to find AR,MA,ARIMA.ARMA,SARIMA,SARMA of a time series data in r
library(readxl)
export1 <- read_excel("C:/Users/Hazeeb/OneDrive/Desktop/data/export1.xlsx")
View(export1)
class(export1)
#> [1] "tbl_df" "tbl" "...
0
votes
0
answers
9
views
How can we make use of feature variables whose future values are fixed to predict target value?
With regard to time series features in a regression ML model.
Suppose, we are living in a space colony. The temperature there is accurately under control, so we will know the temperature next week.
...
0
votes
0
answers
7
views
How to compare timeseries that are measured in equal (regular), but shifted intervals?
I have two timeseries measured with weekly intervals (the intervals are regular). However, the first one is measured for Monday to Sunday intervals and the other is measured for Sunday to Saturday ...
0
votes
0
answers
13
views
Time series and how I can construct a ts object
I have a dataset with 3 variables:
the first is date (example"01/01/2019" )
the second is hour (example:"01:00"), and
the third is a numeric.
I want to construct an object ts, but ...
-1
votes
0
answers
40
views
Keras LSTM - Why do my predictions sum to 1? [closed]
I have written a simple toy example to test if an LSTM can work for predicting 1-day ahead event occurences using the data of previous event occurences. My example consists of 3 events:
Going to work:...
0
votes
0
answers
15
views
Add different geom_hlines to melted data R plots
I am plotting multiple timeseries in one ggplot.
Code looks something like this:
df_melt = melt(all_ts, id.vars = 'time')
ggplot(df_melt, aes(x = time, y = value)) +
geom_line() +
...
-1
votes
0
answers
22
views
How to perform Time Series Normalization
I have a dataset of time series samples from a physiological sensor, per example, TS is 3 samples with 5 data points:
TS = np.random.random((3, 5))*20
How do I normalize this data, by removing the ...
0
votes
1
answer
21
views
Using resample to group date by hour
I have a data frame with a column that records date and time from Jan - Dec as ‘start_date’. I want to group the data by hour and find the mean. When I use .resample(‘H’) it groups into hours for each ...
0
votes
2
answers
23
views
time series with specific date tick marks & labels
I have time series data, with data points for each season turn (mar 21st, jun 21st, sept 21st & dec 21st) between 2016 and 2020.
I am trying to plot this data but it insists on setting tick labels ...
0
votes
0
answers
6
views
Unusual behaviour with ACF and PACF graphs
I am working on a dataset with the following ACF and PACF plots. Having performed the Augmented Dickey Fuller test, the series stationary as the p-value is extremely small and the test statistic is ...
-1
votes
0
answers
29
views
How to do feature engineering for time-series data?
I am new to time-series data. And I have time-series data. The categorical data will be the same for all the dates but it will be different for numerical data. So, how can I bring multiple rows into ...
0
votes
0
answers
9
views
RasterStack Time series in r + dataframe
I have a raster time series of dimensions: 180, 208, 37440, 373 (nrow, ncol, ncell, nlayers). It represents monthly evapotranspiration from 1980 to 2010.
dput(rts[1:5, c(1,3)])
structure(c(NA_real_, ...
0
votes
0
answers
6
views
Add a drift component to sarima.for() from the astsa package in R
Does anyone know if there is a parameter for including drift for the function sarima.for() in astsa package? I've tried include.drift = T but that did not work.
-1
votes
1
answer
29
views
How to convert event dates to longitudinal data in R?
I have a dataset of individual subject records with birth, diagnosis, and death dates. I would like to turn this into longitudinal data that shows whether or not subjects have been born, have been ...
0
votes
1
answer
55
views
Plot time series without straight lines
I am trying to plot some time series but since I have data only for the summer I get these straight lines. Any idea how to fix that? The code I used: Any idea would be helpful!
ggplot(ba, aes(x=...
0
votes
0
answers
11
views
Keras: Dealing with ndim Value Errors and understanding the Input() layer
I am predicting daily event occurences for different agents. For this I constructed:
x_traindict: A dictionary where the keys are some agent_id, like 123456. Attached to each agent is an instance of ...
1
vote
0
answers
18
views
Timeseries Prediction - Python
I have a data for 8 hours where data is not present in between. For example:
Missing Data
Can we use any of the timeseries forecasting techniques to predict the missing data in between ? If yes, how ?
...
1
vote
3
answers
52
views
Cumulative sum and substract over time when condition are met
I have a dataframe with IOT sensors data. What I'm trying to get a humidity score over time when a condition is met.
Let's say that my df looks like this:
Day Flat Humidity
31/12 1 ...
0
votes
1
answer
23
views
Get best parameters for time series without losing data
I'm trying to do demand sensing for a dataset. Presently I have 157 weeks of data(~3years) and I have to predict next month(8 weeks).In the training dataset, I'm using 149weeks as a train and the last ...
0
votes
0
answers
21
views
How to CONCATENATE the output of LSTM and One hot encoding values
I'm working on a time series prediction using LSTM for used power. I could implement it with a pure LSTM. But i have categorical values which i one hot encoded.
Now, I want to concatenate the LSTM ...
0
votes
0
answers
7
views
Postgres SQL stich timeseries together based on date and specified columns
The table contains the following columns: date, value, name, indicator.
indicator: Nomination, Renomination, Physical Flow, Allocation, Forecast
name: Apple, Orange, Bannana, Strawberry
Aim: Stich ...
0
votes
0
answers
8
views
Is It Appropriate to Conduct Interrupted Time Series (ITS) Analysis or Repeated-Measures Panel Analysis When Intervention Start Dates Vary?
I am attempting to estimate the causal effect of intervention receipt (i.e., enrollment in a case management program) on a set of count outcomes (i.e., monthly visits to the doctor). Individuals ...
0
votes
0
answers
25
views
Lagged cumulative sum for time series based off of multiple conditions
I'd like to get the cumulative sum of the corresponding records in the smaller column for each name under Species_a and Species_b as two new columns, and have them in the same row without including ...
0
votes
0
answers
26
views
ARIMA - PACF and ACF looks similar
I'm trying to build an ARIMA model and choose the appropriate order of AR(p) and MA(d).
I'm using ACF and PACF plots. They look very similar, very same (please take a look).
ACF and PACF plots
Could ...