wildboar.base
#
Base classes for all estimators.
Module Contents#
Classes#
Base estimator for all Wildboar estimators. |
|
Mixin class for counterfactual explainer. |
|
Mixin class for all explainers in wildboar. |
Functions#
|
Check if estimator is a counterfactual explainer. |
|
Check if estimator is an explainer. |
- class wildboar.base.BaseEstimator[source]#
Base estimator for all Wildboar estimators.
- get_metadata_routing()[source]#
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
- Returns:
- routingMetadataRequest
A
MetadataRequest
encapsulating routing information.
- get_params(deep=True)[source]#
Get parameters for this estimator.
- Parameters:
- deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns:
- paramsdict
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
Pipeline
). 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:
- selfestimator instance
Estimator instance.
- class wildboar.base.ExplainerMixin[source]#
Mixin class for all explainers in wildboar.
- fit_explain(estimator, x=None, y=None, **kwargs)[source]#
Fit and return the explanation.
- Parameters:
- estimatorEstimator
The estimator to explain.
- xtime-series, optional
The input time series.
- yarray-like of shape (n_samples, ), optional
The labels.
- **kwargs
Optional extra arguments.
- Returns:
- ndarray
The explanation.