Comments (3)
Hi Diogo,
It seems that the number of windows available for the model are zero, when that happened to me before it was that the output_size was too big for a series of your data, try to make sure that the series are long enough. Hope this helps.
from esrnn_torch.
Thanks for the prompt reply. The data has ~2.5k observations, around 7 years. I am sending my data on this link
and the code is below. Thank you for the support!
`# Python
import pandas as pd
#get data
data = pd.read_csv("DHS_Daily_Report.csv")
#transforming date variable
data["Date"] = pd.to_datetime(data["Date"], format = "%m/%d/%Y")
data["Date"] = data["Date"].dt.strftime("%Y-%m-%d")
#rename forecasting variable
data = data.rename(columns = {'Total Individuals in Shelter' : 'y'})
data = data.rename(columns = {'Date' : 'ds'})
#selecting variables
#selecting variables
dataset = data.loc[data["ds"] <= "2020-11-11", ["ds","y", "Easter",
"Thanksgiving", "Christmas"]]
future = data.loc[data["ds"] >= "2020-11-12", ["ds","y", "Easter",
"Thanksgiving", "Christmas"]]
#adding unique IDs
dataset.insert(0, 'unique_id', dataset.index)
#isolate Y and X
y_df = dataset.loc[:, ["unique_id", "ds", "y"]]
X_df = dataset.loc[:, ["unique_id", "ds", "Easter"]]
X_df = X_df.rename(columns = {'Easter' : 'x'})
#forecasting model
from ESRNN import ESRNN
model = ESRNN(max_epochs=25,
freq_of_test=5,
batch_size=4, learning_rate=1e-4,
per_series_lr_multip=0.8, lr_scheduler_step_size=10,
lr_decay=0.1, gradient_clipping_threshold=50,
rnn_weight_decay=0.0, level_variability_penalty=100,
testing_percentile=50, training_percentile=50,
ensemble=False, max_periods=25, seasonality=[],
input_size=4, output_size=6,
cell_type='LSTM', state_hsize=40,
dilations=[[1], [6]], add_nl_layer=False,
random_seed=1, device='cpu')
model.fit(X_df, y_df)
from esrnn_torch.
The input_size and output_size might be just too big for a series in your panel to handle.
Check if your panel data is balanced and try to either avoid very short series or pad them.
Another thing I advice is to look at the package hyperopt (or similar) to tune the hyperparameters of the ESRNN, doing manually is time consuming.
from esrnn_torch.
Related Issues (20)
- Example of use of the 'unique_id' and 'x' variables. HOT 1
- How to set seasonality HOT 2
- application for time series data with trend HOT 1
- Saving Model HOT 1
- Why is numpy==1.16.1 the only numpy version compatible with ESRNN? HOT 1
- AssertionError: clean np.nan's from unique_idxs unbalanced Y_df HOT 10
- Save functionality broken; ESRNN Model Object structure not reflected in save & load
- Exogenous variables HOT 1
- Allow for more covariates / features HOT 1
- ES-RNN for long sequence time series forecasting? HOT 1
- Prediction interval for ES-RNN HOT 5
- Data Formatting for ES-RNN HOT 1
- Hourly results typo in the results table in readme? HOT 2
- input format of training and test data HOT 1
- Input for OWA Calculation - AttributeError HOT 2
- how to use continuous exogenous variable in the future for forecasting problem HOT 1
- Return NaN prediction
- How to prepare the data format? HOT 12
- problem with pandas HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esrnn_torch.