Post by garba moussats=2018-10-19T14:52:04.258+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" self.handler.end_batch(request.end)"
ts=2018-10-19T14:52:04.258+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" File
\"/tmp/kapacitor_udf/kapacitor/udf/agent/py/arma_model.py\", line 170, in
end_batch"
ts=2018-10-19T14:52:04.258+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" forecast = self._state.arma_model()"
ts=2018-10-19T14:52:04.258+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" File
\"/tmp/kapacitor_udf/kapacitor/udf/agent/py/arma_model.py\", line 91, in
arma_model"
ts=2018-10-19T14:52:04.258+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" forecast =
self._model.predict(start_date.isoformat(), end_date.isoformat())"
ts=2018-10-19T14:52:04.258+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" File
\"/usr/local/lib/python2.7/dist-packages/statsmodels/base/wrapper.py\",
line 95, in wrapper"
ts=2018-10-19T14:52:04.263+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" obj = data.wrap_output(func(results, *args,
**kwargs), how)"
ts=2018-10-19T14:52:04.263+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" File
\"/usr/local/lib/python2.7/dist-packages/statsmodels/tsa/arima_model.py\",
line 1506, in predict"
ts=2018-10-19T14:52:04.271+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" return self.model.predict(self.params, start,
end, exog, dynamic)"
ts=2018-10-19T14:52:04.271+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" File
\"/usr/local/lib/python2.7/dist-packages/statsmodels/tsa/arima_model.py\",
line 719, in predict"
ts=2018-10-19T14:52:04.271+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" self._get_prediction_index(start, end, dynamic))"
ts=2018-10-19T14:52:04.271+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" File
\"/usr/local/lib/python2.7/dist-packages/statsmodels/tsa/arima_model.py\",
line 651, in _get_prediction_index"
ts=2018-10-19T14:52:04.271+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" super(ARMA, self)._get_prediction_index(start,
end, index))"
ts=2018-10-19T14:52:04.271+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" File
\"/usr/local/lib/python2.7/dist-packages/statsmodels/tsa/base/tsa_model.py\",
line 479, in _get_prediction_index"
ts=2018-10-19T14:52:04.280+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text=" raise KeyError('The `start` argument could not
be matched to a'"
ts=2018-10-19T14:52:04.280+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text="KeyError: 'The `start` argument could not be matched
to a location related to the index of the data.'"
ts=2018-10-19T14:52:04.280+02:00 lvl=info msg="UDF log"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 text="2018-10-19 14:52:04,280 ERROR:root: error processing
request of type end: 'The `start` argument could not be matched to a
location related to the index of the data.'"
ts=2018-10-19T14:52:04.280+02:00 lvl=error msg="received error message"
service=kapacitor task_master=main task=arma_responsetime_absipevwp54
node=arma_model2 err="error processing request of type end: 'The `start`
argument could not be matched to a location related to the index of the
data.'"
Post by j***@gmail.comPost by garba moussaHi nice people
I use ARMA MODEL to forecast values but when i call predict method I
have this error : attributeerror: 'nonetype' object has no attribute
'predict'
66 self._model = ARMA(ts_arma_model,
order=order).fit(full_output= False, transparams=False, disp=False)
I guess this raises an exception, and then self._model is not defined.
Try without the try... except to see if there is a problem.
AFAIR, full_output=False is not allowed in some of the optimizers.
Josef
Post by garba moussa68 pass
69 # self._params = self._model.self._params
70 logger.debug('SELF MODEL %s',self._model)
71 # self._model = sm.tsa.ARMA(ts,
order=self._order).fit(method='mle', trend='nc')
72 logger.info("SELF MODEL : %s", self._model)
73 # start_date = ts_arma_model.index[-1] +
self._period
74 # end_date = start_date + (self._predict
-1)*self._period
75 # forecast =
self._model.predict(self._params.all, start_date.isoformat(),
end_date.isoformat())
76 # logger.debug(forecast)
77
78 start_date = ts_arma_model.index[-1] + self._period
79 # start_date = '2018-10-18 02:19:58.314000'
80 logger.debug('START DATE %s',start_date)
81 end_date = start_date + (self._predict
-1)*self._period
82 # end_date = '2018-10-18 03:08:58.493000'
83 logger.debug('END DATE %s',end_date)
84 forecast =
self._model.predict(start_date.isoformat(), end_date.isoformat())
I have this error attributeerror: 'nonetype' object has no attribute
'predict
Thanks for your help