from autots import AutoTS
model = AutoTS(forecast_length=10, frequency='infer',ensemble='simple', drop_data_older_than_periods=200)
model = model.fit(data, date_col='Date', value_col='Close', id_col=None)
当我尝试运行它时,它给了我这个错误。
Using 1 cpus for n_jobs.
---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
<ipython-input-9-eb76a397227f> in <cell line: 2>()
1 from autots import AutoTS
----> 2 model = AutoTS(forecast_length=10, frequency='infer',ensemble='simple', drop_data_older_than_periods=200)
3 model = model.fit(data, date_col='Date', value_col='Close', id_col=None)
2 frames
/usr/lib/python3.10/json/decoder.py in decode(self, s, _w)
338 end = _w(s, end).end()
339 if end != len(s):
--> 340 raise JSONDecodeError("Extra data", s, end)
341 return obj
342
JSONDecodeError: Extra data: line 1 column 4 (char 3)
我已经安装了这些库。我试图使用 Python 中的 autots 库,但无法使用它,因为它给了我这个错误,我很困惑它出了什么问题。
!pip install auto_ts
!pip install autots
这是 AutoTS 中的错误。
如该行所示,它的开头有 '" ,这会导致 json 解码器失败。
降级自动程序以进行快速修复。