Weekly Data input issue in AR #379
Unanswered
Diksha-cmd
asked this question in
Q&A - get help using NeuralProphet
Replies: 1 comment
-
Hi @Diksha-cmd were you able to find the source of the missing values? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am using the below code to forecast sales:
from neuralprophet import NeuralProphet
df_ts_1= df_filtered[df_filtered["RetailerSku"]== 'B001EJOPHK']
df_ts = pre_process_data(df_ts_1)
y= df_ts["UnitsSold"] # defining y variable
x= df_ts["WeekEnding"] # defining x variable
y_value = y.values
y_value = y_value.astype('float64')
df = pd.DataFrame({'ds':pd.DatetimeIndex(list(x)), 'y': list(y_value)})
split into train and test sets
train_size = int(len(y_value) * 0.67)
test_size = len(y_value) - train_size
train, test = df[0:train_size], df[train_size:len(y_value)]
print(len(train), len(test))
m = NeuralProphet(n_forecasts=3, n_lags=5)
metrics = m.fit(train, freq="W")
future = m.make_future_dataframe(train, periods=52)
forecast = m.predict(future)
and i am getting the below error:
ValueError: More than 30 consecutive missing values encountered in column y. Please preprocess data manually.
there are no missing values in the dataset and i am getting this error only when i am trying to use auto regression parameter n_lags
Beta Was this translation helpful? Give feedback.
All reactions