2,262 questions
0
votes
0
answers
21
views
Forecasting : FB Prophet function doesn't start from last datapoint in python
I've noticed that Facebook's Prophet function does a good job with forecasting. However, for my data, it never starts at the last value of y-predict. As you can see in the image, the last value of ...
0
votes
0
answers
30
views
How to run MLLib random forest in Databricks on time series data?
I try to forecast time series data, namely the "outgoing_quantity". My data consists of two "ID" columns ("gtin" and "location_id"). For each combination of ...
0
votes
0
answers
48
views
Unclear formulation in Temporal Fusion Transformer paper
I am currently trying to implement the Temporal Fusion Transformer using PyTorch.
This paper (https://arxiv.org/pdf/1912.09363) is my reference.
Currently I am stuck with the variable selection ...
2
votes
1
answer
64
views
skforecast insample predictions
Using skforecast, it's straightforward to perform out-of-sample predictions starting from the dates in the last_window_.index of a ForecasterRecursive object. However, I’m unable to find a clear ...
0
votes
0
answers
85
views
About test set of XGBoost for Time Series Forecasting
I have questions about using XGBoost for the Time Series Forecasting problem.
According to these articles:
Multi-step time series forecasting with XGBoost | Towards Data Science
XGBoost for Multi-...
1
vote
1
answer
59
views
Time series data in R - seasonal plot using ggseasonalplot and autoplot
I have two months daily time series data starting from 1st january 2025.The data shows high value on weekdays and dip on sat and sunday. Also weekdays of 1st two weeks of the month have high value as ...
1
vote
0
answers
36
views
AutoML Forecast fails when using feature_store_lookups with timestamp key
We are running AutoML Forecast on Databricks Runtime 15.4 ML LTS and 16.4 ML LTS, using a time series dataset with temporal covariates from the Feature Store (e.g. a corona_dummy feature). We use ...
0
votes
1
answer
68
views
How to add legend for a single series in Fable autoplot and autolayer, similar to forecast::autolayer?
The forecast package version of autolayer has this nice series argument for adding a legend to one's forecast plots.
library(feasts)
library(forecast)
ETS <- forecast(ets(AirPassengers), h=5)
...
0
votes
1
answer
77
views
nnetar with tscv including xreg
I am using the following code to forecast electricity price up to 180 days ahead:
far2_xreg <- function(x, h, xreg, newxreg) {
forecast(nnetar(x, xreg=xreg, p=7, size=5, repeats=5), xreg=newxreg, ...
0
votes
2
answers
71
views
How to adjust Fable forecast .mean before autoplot?
I have been following the fpp3 textbook and using packages: fpp3, tidyverse.
I have a Fable forecast, but would like to make manual modifications to the .mean. This is easily done by accessing those ...
5
votes
1
answer
152
views
Darts and LightGBM: original column names cannot be retrieved for feature importance
Problem
I am running a LightGBMModel via Darts with some (future) covariates. I want to understand the relevance of the different (lagged) features.
In particular, I would like to retrieve the feature ...
1
vote
2
answers
46
views
Eliminate forecast for past dates
Following on from How attach actuals and forecast in a Line Chart, what I want to do now is to show the forecast but only for dates from today.
This is the code:
Forecast Engine =
SUMX(
DISTINCT('...
0
votes
1
answer
129
views
How attach actuals and forecast in a Line Chart
I have 2 problems with my forecast.
My forecast is this:
2025 & Forecast =
VAR CurrentMonth = MAX('Calendar'[Month Number])
-- Actual 2025 value
VAR Actual2025 = CALCULATE(
SUM(Forecast[...
0
votes
0
answers
55
views
Python PyTorch DeepAR forecasting model with weighted loss
I have a problem of 20 timeseries groups. I need to forecast them for a horizon of 180 days. I am having a context length of 365 days as I only have 4 years of data for them.
I coded timeseriesdataset,...
0
votes
0
answers
38
views
Interest rate EURIBOR-Switch regime monte carlo
Question for Expert Forum:
I am working on a Regime-Switching Monte Carlo Simulation for EURIBOR interest rates, where I
Estimate separate ARIMA models for three identified regimes (Hiking, Cutting, ...
0
votes
0
answers
55
views
Error when using inverse_transform with Diff() in Darts: "Expected series to begin at time X"
I am working on a time series forecasting problem using the Darts library in Python. My goal is to forecast non-stationary time series data, specifically groundwater level data, using various models ...
0
votes
0
answers
48
views
Is a two-phase model (ensembling/stacking) a valid approach for forecasting product demand?
I am working on a project to forecast food sales for a corporate restaurant. Sales are heavily influenced by the number of guests per day, along with other factors like seasonality, weather conditions,...
2
votes
2
answers
124
views
Weibull Predictions using R and current component hours
I have failure data for tire removals that I have fitted to a weibull distribution, which has parameters beta = 1.09 and eta = 2750. Using the weibull parameters I would like to apply this to another ...
1
vote
1
answer
243
views
How to forecast values with multiple regressors using fbprophet?
I want to forecast hourly temperature values using the fbprophet model. So far I have trained the model on just ds and y variable and it is giving me good results. But now I want to add extra ...
0
votes
0
answers
119
views
How to Perform Out-of-Sample Forecast for a Hybrid VAR-LSTM Model?
I have built a hybrid model that combines a Vector Autoregressive (VAR) model and a Long Short-Term Memory (LSTM) network. The VAR model is used to capture linear dependencies between macroeconomic ...
0
votes
1
answer
45
views
AttributeError: 'SVARResults' object has no attribute 'k_exog_user'
I am using the following code to conduct a SVAR estimation:
data_q = pd.DataFrame({'GDP': GDP,
'CPI': CPI_q,
'Interest_rate': Interest_rate_q,
...
0
votes
0
answers
51
views
TypeError: unsupported operand type(s) for +: 'Timestamp' and 'NoneType' when using exogenous features in skforecaster ForecasterRecursive
I am trying to implement a forecasting model, and have followed this Medium guide. I have changed the code minimally, to get it working with the most recent version of skforecast (e.g. changing ...
0
votes
0
answers
36
views
Using the hts package in R, how to reconcile hierarchical forecasts (using non-standard models)
I am working with the hts package in R - I have several groups of hierarchical forecasts which I need to reconcile. However, I am working with a non-standard forecasting model, so am unable to ...
0
votes
1
answer
69
views
HORIZON in CREATE_MODEL statement for BigQuery ML forecast using ARIMA_PLUS
What's the purpose of HORIZON in bqml CREATE_MODEL statement for ARIMA_PLUS?
The resulting model doesn't have any forecast and I think CREATE_MODEL will fit the model based on all data points, without ...
1
vote
0
answers
43
views
SVAR from statsmodel.tsa: if len(A_guess) != n_masked_a: TypeError: object of type 'int' has no len()
I am using the following code to conduct a SVAR estimation but it keeps crashing, always the same kind of error:
len(A_guess) != n_masked_a: TypeError: object of type 'int' has no len().
CAN ANYONE ...
0
votes
1
answer
35
views
Troubleshooting LSTM Forecasting Function: What am I doing wrong?
I have three inputs to my LSTM (x,y,z). My LSTM model is used to predict the next time step of z. I have a lookback period of 9 timesteps. I then need to forecast the next time steps of z using a ...
0
votes
0
answers
40
views
Plotting Predicted Mortality Rates for Calendar Years 1990–2020 with Lee-Carter Model in R
I'm working on fitting a Poisson Lee-Carter model to the Danish male population data for calendar years 1990–2010 and ages 20–90 in R. After fitting the model, I want to plot the predicted mortality ...
-1
votes
1
answer
263
views
Why do I get "AttributeError: 'str' object has no attribute 'value'" when trying to use darts ExponentialSmoothing with a "trend" argument?
Here is the code I have:
# Define models
models = {
'ExponentialSmoothing': [
ExponentialSmoothing(trend='add', seasonal='add', seasonal_periods=52),
ExponentialSmoothing(trend='add', ...
0
votes
1
answer
54
views
Forecasting aggregation throwing error Error in base::colMeans(x, na.rm = na.rm, dims = dims, ...) : 'x' must be an array of at least two dimension
I am new to forecasting. I am trying to do a hierarchical forecast using the HTS package. I have created two hierarchies. And then I applied below:
forecast_middle_out_lum_arima <- forecast(...
0
votes
0
answers
32
views
recommendation engine for frequently bought products
I have the Sales billed data to a customer, where i want to develop a recommendation engine which will recommend the product purchased with minimum frequency of 8 times and the quantity of those ...
0
votes
0
answers
37
views
Prediction Errors with Time Series Forecasting - LSTM
Review of the Time Series Prediction Code
In this project, we aim to predict consumption values using a Long Short-Term Memory (LSTM) model based on historical data. Below is a breakdown of the ...
0
votes
0
answers
95
views
Why is my ARIMA model's prediction a straight line?
I am trying to create an ARIMA model to predict road traffic for a single node using the PEMS08 dataset preprocessed for ASTGCN. I used the statsmodels library together with the auto_arima function of ...
0
votes
1
answer
87
views
Built-in Pandas function for cell-level apply with index/column awareness?
I am cleaning historical data for forecasting for exponential smoothing. I have data at the US county level (i.e., second-level administrative division), but there are a lot of zero values (due to low ...
1
vote
0
answers
60
views
ARIMA model with seasonal adjusted series
I want to forecast the series with trend and seasonal components using ARIMA model. But is that posible that I use the seasonally adjusted data for ARIMA model to gain the forecast data, then add the ...
1
vote
0
answers
67
views
Out-of-sample forecast with SARIMAX
Goal: I want to train a SARIMAX (actually, an MA(1)-X) model on some training data (endog + exog) and then test it on new, test data. That is, once we have the coefficient for the error term in the MA ...
2
votes
0
answers
129
views
How to Exclude Weekends in Prophet Model for Forex Data?
Question:
I'm working on a time series forecasting project using Prophet to predict foreign exchange (forex) rates, specifically USD to MXN. Since the forex market does not operate on weekends, I need ...
1
vote
1
answer
58
views
A question for the Rolling Cross Validation where the tsCV function in R is used
I have one data set consisting of a total of 16 data (quarterly data from 2012 to 2015) as sample data set.
I want to predict the 15th data (3rd quarter of 2015) from the model learned with an arima ...
1
vote
1
answer
402
views
BigQuery Arima Plus forecasts are higher than expected
I am trying to predict values from a lot of different devices (1000s, testing on a few hundred for performance reasons) on 15 min resolution. All of the devices log: name and value. I have tried ...
0
votes
1
answer
152
views
How to deal with Summer-only daily data for STL and time series modelling in R? (working in the fable framework)
I would like to know if there is a proper way to deal (decompose, model, etc.) with data restricted to one period of the year, like Summer-only data, or any such period, across years.
And I guessed ...
0
votes
1
answer
69
views
How to inversely transform time series predictions to add seasonality back in? [closed]
I have transformed some data to make it stationary before fitting an ARIMA(1,0,1) model.
I specifically want to manually transform the data to better understand the process.
I can successfully fit a ...
2
votes
3
answers
1k
views
Optimizing pandas performance on large datasets
I'm working with a large dataset (~10 million rows and 50 columns) in pandas and experiencing significant performance issues during data manipulation and analysis. The operations include filtering, ...
-1
votes
1
answer
138
views
forecast payment terms by calculating payment by month and stop calculating on need date
I'm trying to forecast payments into the future and calculate the cost per month from the order date to need date and stop calculating the month of the need date. I'm tracking multiple orders under ...
0
votes
0
answers
98
views
Why are my SARIMA model forecasts all NaN in the DataFrame?
I am working on a cash flow forecasting project using Python and the pmdarima library for SARIMA model predictions. I’m able to generate predictions for each column and print them, but when I try to ...
0
votes
0
answers
154
views
Why does my forecast/prediction using a VAR in statsmodels quickly converge to zero?
Outline: I am using a vector autoregression (VAR) model from the statsmodel package https://www.statsmodels.org/stable/vector_ar.html#var.
My two time-series, let us call them time-series 1) ts1 and 2)...
1
vote
0
answers
80
views
Microsoft ML .Net Forecasting Model backtest usage issue
I am new in ML .Net Forecasting. I am trying to build a simple application for Prediction.
Time Series (step is 1 month, 1993-1995),
Data = values incrementing with step 10 starting from 100.
Then I ...
0
votes
1
answer
380
views
I want to predict stock price in next 60 days by machine learning
I wanted to predict stock price in the next 60 days but after I finished writing the code, it predicted backward instead. Can anyone advise me? How can I do it? I revised my code but it's not working.
...
1
vote
0
answers
54
views
Power BI Forecasting: Forecast full data based on partial
I'd like help forecasting completion rate by start date.
People start a programme, after they start, at any time they may finish the programme and when they do they will have a status of Completed or ...
-1
votes
1
answer
58
views
LSTM forecasting predicts zeros
i'm building an LSTM model to forecast future total number of cases for covid 19 using OWID dataset
i use a multivariate series of 6 columns including the date column,
the Problem is i get all zero ...
1
vote
0
answers
113
views
auto_arima from pmdarima has insane execution times increases at the growing of m, what's the cause?
I'm trying to fit a SARIMA model for my time series, in order to find the best model I'm using autom_arima from pmdarima. The code is simply:
stepwise_fit = pm.auto_arima(train_dataset['shift_hours'], ...
0
votes
1
answer
157
views
Getting ACF using statsmodels for a list of lags
I am able to use statsmodels.graphics.tsaplots.plot_acf to get a plot of the acf's for a specific list of lags, as the lags input accepts a list of values. I would like to have the raw data of the acf'...