module helpers.pipeline#

Inheritance diagram of mlinsights.helpers.pipeline

Short summary#

module mlinsights.helpers.pipeline

Dig into pipelines.

source on GitHub

Classes#

class

truncated documentation

BaseEstimatorDebugInformation

Stores information when the outputs of a pipeline is computed. It as added by function @see fct alter_pipeline_for_debugging. …

Functions#

function

truncated documentation

alter_pipeline_for_debugging

Overwrite methods transform, predict, predict_proba or decision_function to collect the last inputs and outputs …

enumerate_pipeline_models

Enumerates all the models within a pipeline.

Methods#

method

truncated documentation

__init__

__repr__

usual

display

Displays the first

to_str

Tries to produce a readable message.

Documentation#

@file @brief Dig into pipelines.

class mlinsights.helpers.pipeline.BaseEstimatorDebugInformation(model)#

Bases: object

Stores information when the outputs of a pipeline is computed. It as added by function @see fct alter_pipeline_for_debugging.

__init__(model)#
__repr__()#

usual

display(data, nrows)#

Displays the first

to_str(nrows=5)#

Tries to produce a readable message.

mlinsights.helpers.pipeline.alter_pipeline_for_debugging(pipe)#

Overwrite methods transform, predict, predict_proba or decision_function to collect the last inputs and outputs seen in these methods.

@param pipe scikit-learn pipeline

The object pipe is modified, it should be copied before calling this function if you need the object untouched after that. The prediction is slower. See notebook Visualize a scikit-learn pipeline.

mlinsights.helpers.pipeline.enumerate_pipeline_models(pipe, coor=None, vs=None)#

Enumerates all the models within a pipeline.

@param pipe scikit-learn pipeline @param coor current coordinate @param vs subset of variables for the model, None for all @return iterator on models tuple(coordinate, model)

See notebook Visualize a scikit-learn pipeline.