I couldn't implement n_lags for my prediction problem #1663
Unanswered
Praneetha777
asked this question in
Q&A - get help using NeuralProphet
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello @ourownstory,
Thank y'all for the neural prophet and the smart defaults it has, really appreciate how y'all came up with it!
This is the code snippet that I've used for predicting my target:-
from neuralprophet import NeuralProphet
m=NeuralProphet(n_lags=12,
seasonality_mode='additive',
learning_rate=0.1,
batch_size=128,
# Enable all seasonality components
yearly_seasonality=True,
weekly_seasonality=True,
daily_seasonality=True,drop_missing=True
)
m.add_future_regressor(name='OAT')
metrics = m.fit(df,freq='T',epochs=10)
m.set_plotting_backend("matplotlib")
When i implement lags to my dataset, loss values after training are:-
(v_num=0, train_loss=nan.0, reg_loss=0.000, MAE=nan.0, RMSE=nan.0, Loss=nan.0, RegLoss=0.000). What can i do to avoid these values?
I'm getting the following warnings when i implemented lags even after cleaning my dataframe and removed all NAN's from it, when i tried to predict irrespective of the warnings, i'm getting a ValueError: Length of values (749843) does not match length of index (755711)
WARNING - (NP.forecaster.fit) - When Global modeling with local normalization, metrics are displayed in normalized scale.
WARNING:NP.forecaster:When Global modeling with local normalization, metrics are displayed in normalized scale.
WARNING - (py.warnings._showwarnmsg) - FutureWarning: Series.view is deprecated and will be removed in a future version. Use
astype
as an alternative to change the dtype.WARNING:py.warnings:FutureWarning: Series.view is deprecated and will be removed in a future version. Use
astype
as an alternative to change the dtype.INFO - (NP.df_utils._infer_frequency) - Major frequency 5min corresponds to 28.753% of the data.
INFO:NP.df_utils:Major frequency 5min corresponds to 28.753% of the data.
WARNING - (NP.df_utils._infer_frequency) - Dataframe has multiple frequencies. It will be resampled according to given freq T. Ignore message if actual frequency is any of the following: SM, BM, CBM, SMS, BMS, CBMS, BQ, BQS, BA, or, BAS.
WARNING:NP.df_utils:Dataframe has multiple frequencies. It will be resampled according to given freq T. Ignore message if actual frequency is any of the following: SM, BM, CBM, SMS, BMS, CBMS, BQ, BQS, BA, or, BAS.
WARNING - (py.warnings._showwarnmsg) - FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead.
WARNING:py.warnings:FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead.
INFO - (NP.data.processing._handle_missing_data) - Added 862605 missing dates.
INFO:NP.data.processing:Added 862605 missing dates.
WARNING - (NP.data.processing._handle_missing_data) - 862605 missing values in column y were detected in total.
WARNING:NP.data.processing:862605 missing values in column y were detected in total.
INFO - (NP.data.processing._handle_missing_data) - 714077 NaN values in column y were auto-imputed.
INFO:NP.data.processing:714077 NaN values in column y were auto-imputed.
WARNING - (NP.data.processing._handle_missing_data) - More than 30 consecutive missing values encountered in column y. 148528 NA remain after auto-imputation.
WARNING:NP.data.processing:More than 30 consecutive missing values encountered in column y. 148528 NA remain after auto-imputation.
WARNING - (NP.data.processing._handle_missing_data) - 862605 missing values in column OAT were detected in total.
WARNING:NP.data.processing:862605 missing values in column OAT were detected in total.
INFO - (NP.data.processing._handle_missing_data) - 714077 NaN values in column OAT were auto-imputed.
INFO:NP.data.processing:714077 NaN values in column OAT were auto-imputed.
WARNING - (NP.data.processing._handle_missing_data) - More than 30 consecutive missing values encountered in column OAT. 148528 NA remain after auto-imputation.
WARNING:NP.data.processing:More than 30 consecutive missing values encountered in column OAT. 148528 NA remain after auto-imputation.
INFO - (NP.config.init_data_params) - Setting normalization to global as only one dataframe provided for training.
INFO:NP.config:Setting normalization to global as only one dataframe provided for training.
WARNING - (NP.time_dataset.drop_nan_after_init) - 218944 samples with missing values were dropped from the data.
WARNING:NP.time_dataset:218944 samples with missing values were dropped from the data.
Information about my timestamps:-My timestamps are irregular and they don't follow any particular order. I'm not sure if the irregularity is the reason for neural prophet to think that there are missing timestamps when applying lags.
Any help is greatly appreciated!!! Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions