folie
.LikelihoodEstimator¶
- class folie.LikelihoodEstimator(transition, **kwargs)[source]¶
Likelihood-based estimator
- Parameters:
- modelModel, optional, default=None
A model which can be used for initialization. In case an estimator is capable of online learning, i.e., capable of updating models, this can be used to resume the estimation process.
- 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, minimize_kwargs={'method': 'L-BFGS-B'}, **kwargs)[source]¶
Fits data to the estimator’s internal
Model
and overwrites it. This way, every call tofetch_model()
yields an autonomous model instance. Sometimes apartial_fit
method is available, in which case the model can get updated by the estimator.- Parameters:
- dataarray_like
Data that is used to fit a model.
- **kwargs
Additional kwargs.
- Returns:
- selfEstimator
Reference to self.
- 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.LikelihoodEstimator
¶
Overdamped Langevin Estimation