elphick.sklearn_viz.residuals.error.Errors

class elphick.sklearn_viz.residuals.error.Errors(mdl, x_test=None, y_test=None)[source]
__init__(mdl, x_test=None, y_test=None)[source]
Parameters:
  • mdl – The scikit-learn model or pipeline.

  • x_test (Optional[DataFrame]) – X values provided to calculate residuals.

  • y_test (Union[DataFrame, Series, None]) – y values provided to calculate residuals.

Methods

__init__(mdl[, x_test, y_test])

type mdl:

plot([color, title, marginal])

type color:

Optional[str]

plot(color=None, title='Error Plot', marginal=False)[source]
Parameters:
  • color (Optional[str]) – The variable name to color (group) by.

  • title (Optional[str]) – title for the plot

  • marginal (bool) – If True, marginal histograms are added.

Return type:

Figure

Returns:

a plotly GraphObjects.Figure