module mlbatch.pipeline_cache#

Inheritance diagram of mlinsights.mlbatch.pipeline_cache

Short summary#

module mlinsights.mlbatch.pipeline_cache

Caches training.

source on GitHub

Classes#

class

truncated documentation

PipelineCache

Same as sklearn.pipeline.Pipeline but it can skip training if it detects a step was already trained the …

Functions#

function

truncated documentation

isskl023

Tells if scikit-learn is more recent than 0.23.

Properties#

property

truncated documentation

_estimator_type

_final_estimator

_repr_html_

HTML representation of estimator. This is redundant with the logic of _repr_mimebundle_. The latter should …

classes_

The classes labels. Only exist if the last step is a classifier.

feature_names_in_

Names of features seen during first step fit method.

n_features_in_

Number of features seen during first step fit method.

named_steps

Access the steps by name. Read-only attribute to access any step by given name. Keys are steps names and …

Methods#

method

truncated documentation

__init__

_fit

_get_fit_params_steps

Documentation#

Caches training.

source on GitHub

class mlinsights.mlbatch.pipeline_cache.PipelineCache(steps, cache_name=None, verbose=False)#

Bases: sklearn.pipeline.Pipeline

Same as sklearn.pipeline.Pipeline but it can skip training if it detects a step was already trained the model was already trained accross even in a different pipeline.

Parameters
  • steps – list List of (name, transform) tuples (implementing fit/transform) that are chained, in the order in which they are chained, with the last object an estimator.

  • cache_name – name of the cache, if None, a new name is created

  • verbose – boolean, optional If True, the time elapsed while fitting each step will be printed as it is completed.

Other attributes:

Parameters

named_steps – bunch object, a dictionary with attribute access Read-only attribute to access any step parameter by user given name. Keys are step names and values are steps parameters.

source on GitHub

__abstractmethods__ = frozenset({})#
__init__(steps, cache_name=None, verbose=False)#
_abc_impl = <_abc._abc_data object>#
_fit(X, y=None, **fit_params)#
_get_fit_params_steps(fit_params)#
mlinsights.mlbatch.pipeline_cache.isskl023()#

Tells if scikit-learn is more recent than 0.23.