folie
.EMEstimator¶
- class folie.EMEstimator(transition, *args, tol=1e-05, max_iter=100, n_init=1, warm_start=False, no_stop=False, verbose=0, verbose_interval=10, **kwargs)[source]¶
Maximize the likelihood using Expectation-maximization algorithm TODO: Replace all history by a callback
- fetch_model() Model | None [source]¶
Yields the estimated model. Can be None if
fit()
was not called.- Returns:
- modelModel or None
The estimated model or None.
- fit(data, minimizer=None, coefficients0=None, use_jac=True, callback=None, **kwargs)[source]¶
In this do a loop that alternatively minimize and compute expectation
- fit_fetch(data, **kwargs)[source]¶
Fits the internal model on data and subsequently fetches it in one call.
- Parameters:
- dataarray_like
Data that is used to fit the model.
- **kwargs
Additional arguments to
fit()
.
- Returns:
- model
The estimated model.
- get_params(deep=False)[source]¶
Get the parameters.
- Returns:
- paramsmapping of string to any
Parameter names mapped to their values.
- set_params(**params)[source]¶
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters:
- **paramsdict
Estimator parameters.
- Returns:
- selfobject
Estimator instance.
- property has_model: bool¶
Property reporting whether this estimator contains an estimated model. This assumes that the model is initialized with None otherwise.
- Type:
- property model¶
Shortcut to
fetch_model()
.
Examples using folie.EMEstimator
¶
Hidden Overdamped Langevin Estimation