KalmanSmoother.set_filter_method()

statsmodels.tsa.statespace.kalman_smoother.KalmanSmoother.set_filter_method

KalmanSmoother.set_filter_method(filter_method=None, **kwargs)

Set the filtering method

The filtering method controls aspects of which Kalman filtering approach will be used.

Parameters:

filter_method : integer, optional

Bitmask value to set the filter method to. See notes for details.

**kwargs

Keyword arguments may be used to influence the filter method by setting individual boolean flags. See notes for details.

Notes

The filtering method is defined by a collection of boolean flags, and is internally stored as a bitmask. Only one method is currently available:

FILTER_CONVENTIONAL = 0x01
Conventional Kalman filter.

If the bitmask is set directly via the filter_method argument, then the full method must be provided.

If keyword arguments are used to set individual boolean flags, then the lowercase of the method must be used as an argument name, and the value is the desired value of the boolean flag (True or False).

Note that the filter method may also be specified by directly modifying the class attributes which are defined similarly to the keyword arguments.

The default filtering method is FILTER_CONVENTIONAL.

Examples

>>> mod = sm.tsa.statespace.SARIMAX(range(10))
>>> mod.ssm.filter_method
1
>>> mod.ssm.filter_conventional
True
>>> mod.ssm.filter_univariate = True
>>> mod.ssm.filter_method
17
>>> mod.ssm.set_filter_method(filter_univariate=False,
...                           filter_collapsed=True)
>>> mod.ssm.filter_method
33
>>> mod.ssm.set_filter_method(filter_method=1)
>>> mod.ssm.filter_conventional
True
>>> mod.ssm.filter_univariate
False
>>> mod.ssm.filter_collapsed
False
>>> mod.ssm.filter_univariate = True
>>> mod.ssm.filter_method
17

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.tsa.statespace.kalman_smoother.KalmanSmoother.set_filter_method.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部