先知预测饱和最低不起作用

发布于 2025-01-27 00:34:03 字数 509 浏览 3 评论 0 原文

我有一个太阳辐射时间序列数据2年,它的时间为半小时(每30分钟),并且每天和每年的季节性都没有趋势。所有输入y值均高于0和低于1000。在一天的过程中,从午夜到早晨,值为0,在白天到傍晚,下午的峰值为正值,晚上的值为0。

我非常尝试了简单的模型,在预测中,我看到弹出负值(应该为0)。在此处阅读了先知文档和其他帖子后,我尝试使用将地板设置为0的logistic模型饱和最小选项,并在预测中获得负值(应该为0)。

future = m.make_future_dataframe( periods=48, freq='30min')
future['floor']=0
future['cap']=1000
df_solar['cap']=1000
m = Prophet(growth='logistic', weekly_seasonality=False)
forecast = m.fit(df_solar).predict(future)

那么,最低限度不起作用?如何使用值应为0的负值正确预测的负值?任何帮助,感谢。

I have a Solar radiation time series data for 2 years, It is half hourly(every 30 mins) and it has a daily and yearly seasonality with no trend. All the input y values are above 0 and below 1000. Over the course of the day, from midnight till morning the values are 0 and during the day till evening it has positive values with peak in the afternoon and values are 0 in the night.

I intially tried simple model and in the forecasting I see negative values popping up(that were supposed to be 0). After reading through the prophet documentation and other posts here , I tried saturating minimum option, using logistic model with floor set to 0 and cap to 1000, but still I get negative values in the prediction(that was supposed to be 0).

future = m.make_future_dataframe( periods=48, freq='30min')
future['floor']=0
future['cap']=1000
df_solar['cap']=1000
m = Prophet(growth='logistic', weekly_seasonality=False)
forecast = m.fit(df_solar).predict(future)

So, is the staturating minimum not working ? How can I get to predict correctly with out negative values where the values should be 0 ? Any help, appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

℉服软 2025-02-03 00:34:03

我建议绘制模型的组成部分:

m.plot_components(forecast)

使用逻辑增长模型,先知将地板/盖饱和点设置为趋势成分。但是,其他组件(即额外的回归器)可能会将您的预测推向负数。如果您需要在0和1000中进行硬停止,则应考虑审查回归(又称TOBIT回归)。您可以看到一个示例使用pymc 或使用Stan进行估计。

I recommend to plot the components of the model:

m.plot_components(forecast)

With the logistic growth model, Prophet is setting a floor/cap saturation point to the trend component. But it is possible that other components (i.e., the extra regressors) are driving your predictions into a negative number. If you require a hard stop in 0 and 1000, instead you should consider a Censored Regression (a.k.a. Tobit regression). You can see an example using PyMC here or perhaps do the estimation using Stan.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文