我正在处理包括年,月和小时信息的时间序列数据。我正在尝试使用Python在Jupyter Notebook上使用此数据集预测未来。但是,当我运行运行prophet fit()方法的单元格时,遇到了Runtime:初始化错误。我卸载并重新安装了Pandas,numpy,pystan和Prophet,但我不知道此错误的原因是什么。
我使用的代码如下:
from fbprophet import Prophet
df1= df1.rename(columns={'record_date': 'ds', 'fullness_rate': 'y'})
fbp = fbprophet.Prophet()
fbp.fit(df1)
和我的错误:
RuntimeError Traceback (most recent call
last)
~/.local/lib/python3.6/site-packages/fbprophet/forecaster.py in
fit(self, df, **kwargs)
1096 try:
-> 1097 params = model.optimizing(**args)
1098 except RuntimeError:
~/.local/lib/python3.6/site-packages/pystan/model.py in
optimizing(self, data, seed, init, sample_file, algorithm, verbose,
as_vector, **kwargs)
stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_
6967181778173742464.pyx in
stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_
6967181778173742464.StanFit4Model._call_sampler()
stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_
6967181778173742464.pyx in
stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_
6967181778173742464._call_sampler()
RuntimeError: Initialization failed.
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call
last)
<ipython-input-117-b23978e3a63b> in <module>
3 df1= df1.rename(columns={'record_date': 'ds', 'fullness_rate':
'y'})
4 fbp = fbprophet.Prophet()
----> 5 fbp.fit(df1)
~/.local/lib/python3.6/site-packages/fbprophet/forecaster.py in
fit(self, df, **kwargs)
1100 # Fall back on Newton
1101 args['algorithm'] = 'Newton'
-> 1102 params = model.optimizing(**args)
1103 else:
1104 raise
~/.local/lib/python3.6/site-packages/pystan/model.py in
optimizing(self, data, seed, init, sample_file, algorithm, verbose,
as_vector,
**kwargs)stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_
6967181778173742464.pyx in
stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_
6967181778173742464.StanFit4Model._call_sampler()
stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_
6967181778173742464.pyx in
stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_
6967181778173742464._call_sampler()
RuntimeError: Initialization failed.
感谢您的帮助