Hello, im trying to predict 24h of a target, using different models.
However im getting this error
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[36], <vscode-notebook-cell:?execution_count=36&line=1|line 1>
----> <vscode-notebook-cell:?execution_count=36&line=1|1> Y_hat_df = nf.predict(time_col='Time_data', target_col = 'SUD', verbose=True)
<vscode-notebook-cell:?execution_count=36&line=2|2> Y_hat_df = Y_hat_df.reset_index()
<vscode-notebook-cell:?execution_count=36&line=3|3> Y_hat_df.head()
File ~/.local/lib/python3.10/site-packages/neuralforecast/core.py:723, in NeuralForecast.predict(self, df, static_df, futr_df, sort_df, verbose, engine, **data_kwargs)
720 cols = self._get_model_names()
722 # Placeholder dataframe for predictions with unique_id and ds
-->
723 fcsts_df = ufp.make_future_dataframe(
724 uids=uids,
725 last_times=last_dates,
726 freq=self.freq,
727 h=self.h,
728 id_col=self.id_col,
729 time_col=self.time_col,
730 )
732 # Update and define new forecasting dataset
733 if futr_df is None:
File ~/.local/lib/python3.10/site-packages/utilsforecast/processing.py:594, in make_future_dataframe(uids, last_times, freq, h, id_col, time_col)
589 else:
590 df_constructor = pd.DataFrame
591 return df_constructor(
592 {
593 id_col: repeat(uids, h),
-->
594 time_col: time_ranges(starts, freq=freq, periods=h),
595 }
596 )
File ~/.local/lib/python3.10/site-packages/utilsforecast/processing.py:420, in time_ranges(starts, freq, periods)
418 out = np.vstack(out).ravel(order="F")
419 else:
-->
420 raise ValueError(
*
421 f"`starts` must be integers or timestamps, got '{*starts_dtype}'."
422 )
423 out = pd.Series(out)
424 else:
ValueError:
starts
must be integers or timestamps, got '<class 'pandas._libs.tslibs.timestamps.Timestamp'>'.
my dataframe is composed by three columns, unique_id, Time_data (ds) and SUD (y)
Time_data is already time stamp
df.index is a simply RangeIndex(start=0, stop=51673, step=1
Can anyone help me?