You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goals is to use NeuralProphet for anomaly detection within sales data.
I am using NeuralProphet to generate an in sample forecast of the sales data. I then calculate the residuals between the actual sales data value and forecast for each day. I then want to use the residuals for anomaly detection. I have defined changepoints (=red vertical lines) at which shifts in market share take place and the model shall be responsive here in order to only generate small residuals for these expected shifts. Sales are expected to be flat between changepoints if no anomalies (stock outs, quality issues etc.). if sales start to drop between changepoints, this is a sign of an anomaly. I would therefore want to model to generate residuals in this case. however the model follows the sales data 'too well' in my current setup. how can i make the model become less responsive between changepoints if sales start to fall (=generation of residuals) and at the same time very responsive at changepoints?
I would want the model to be less responsvie and generate residuals during the sales drops in April and August.
I have played aroung with trend_reg, which does not seem to have a strong effect on the in sample fc. i have also played aroung with learning_rate which is an approach that may help me, I believe.
model = NeuralProphet(loss_func='Huber', changepoints=changepoints, growth='discontinuous', weekly_seasonality=False, yearly_seasonality=False)
for regressor in competitor_columns:
model=model.add_future_regressor(name=regressor)
I have added future regressors (=market shares of all other competitors on the market)
I am not a developer of NeuralProphet, but I have some thoughts on this issue.
I feel that you should detect anomalies using out-of-sample prediction. For example, use one year of data as the training set to predict the data for the next day.
This is because in-sample prediction is simply fitting the model, and the prediction model will make y and yhat fit very closely.
If you still want to use in-sample prediction, you could try adjusting the regularization terms, as they can affect the flexibility of the fit. Additionally, you can output the value of each component of the prediction result, and by analyzing the component values, you might be able to detect anomalies. This is because each component of NeuralProphet's output has a corresponding meaning.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
My goals is to use NeuralProphet for anomaly detection within sales data.
I am using NeuralProphet to generate an in sample forecast of the sales data. I then calculate the residuals between the actual sales data value and forecast for each day. I then want to use the residuals for anomaly detection. I have defined changepoints (=red vertical lines) at which shifts in market share take place and the model shall be responsive here in order to only generate small residuals for these expected shifts. Sales are expected to be flat between changepoints if no anomalies (stock outs, quality issues etc.). if sales start to drop between changepoints, this is a sign of an anomaly. I would therefore want to model to generate residuals in this case. however the model follows the sales data 'too well' in my current setup. how can i make the model become less responsive between changepoints if sales start to fall (=generation of residuals) and at the same time very responsive at changepoints?
I would want the model to be less responsvie and generate residuals during the sales drops in April and August.
I have played aroung with trend_reg, which does not seem to have a strong effect on the in sample fc. i have also played aroung with learning_rate which is an approach that may help me, I believe.
model = NeuralProphet(loss_func='Huber', changepoints=changepoints, growth='discontinuous', weekly_seasonality=False, yearly_seasonality=False)
for regressor in competitor_columns:
model=model.add_future_regressor(name=regressor)
I have added future regressors (=market shares of all other competitors on the market)
Dok1.docx
All reactions