Documentation
Classes
DecisionBoundaryDisplay

DecisionBoundaryDisplay

Decisions boundary visualization.

It is recommended to use from\_estimator to create a DecisionBoundaryDisplay. All parameters are stored as attributes.

Read more in the User Guide.

Python Reference (opens in a new tab)

Constructors

constructor()

Signature

new DecisionBoundaryDisplay(opts?: object): DecisionBoundaryDisplay;

Parameters

NameTypeDescription
opts?object-
opts.response?ArrayLike[]Values of the response function.
opts.xlabel?stringDefault label to place on x axis.
opts.xx0?ArrayLike[]First output of meshgrid (opens in a new tab).
opts.xx1?ArrayLike[]Second output of meshgrid (opens in a new tab).
opts.ylabel?stringDefault label to place on y axis.

Returns

DecisionBoundaryDisplay

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:25 (opens in a new tab)

Methods

dispose()

Disposes of the underlying Python resources.

Once dispose() is called, the instance is no longer usable.

Signature

dispose(): Promise<void>;

Returns

Promise<void>

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:118 (opens in a new tab)

from_estimator()

Plot decision boundary given an estimator.

Read more in the User Guide.

Signature

from_estimator(opts: object): Promise<any>;

Parameters

NameTypeDescription
optsobject-
opts.X?ArrayLikeInput data that should be only 2-dimensional.
opts.ax?anyAxes object to plot on. If undefined, a new figure and axes is created.
opts.eps?numberExtends the minimum and maximum values of X for evaluating the response function. Default Value 1
opts.estimator?anyTrained estimator used to plot the decision boundary.
opts.grid_resolution?numberNumber of grid points to use for plotting decision boundary. Higher values will make the plot look nicer but be slower to render. Default Value 100
opts.kwargs?anyAdditional keyword arguments to be passed to the plot\_method.
opts.plot_method?"contourf" | "contour" | "pcolormesh"Plotting method to call when plotting the response. Please refer to the following matplotlib documentation for details: contourf (opens in a new tab), contour (opens in a new tab), pcolormesh (opens in a new tab). Default Value 'contourf'
opts.response_method?"auto" | "predict_proba" | "decision_function" | "predict"Specifies whether to use predict_proba, decision_function, predict as the target response. If set to ‘auto’, the response method is tried in the following order: decision_function, predict_proba, predict. For multiclass problems, predict is selected when response\_method="auto". Default Value 'auto'
opts.xlabel?stringThe label used for the x-axis. If undefined, an attempt is made to extract a label from X if it is a dataframe, otherwise an empty string is used.
opts.ylabel?stringThe label used for the y-axis. If undefined, an attempt is made to extract a label from X if it is a dataframe, otherwise an empty string is used.

Returns

Promise<any>

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:137 (opens in a new tab)

init()

Initializes the underlying Python resources.

This instance is not usable until the Promise returned by init() resolves.

Signature

init(py: PythonBridge): Promise<void>;

Parameters

NameType
pyPythonBridge

Returns

Promise<void>

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:68 (opens in a new tab)

plot()

Plot visualization.

Signature

plot(opts: object): Promise<any>;

Parameters

NameTypeDescription
optsobject-
opts.ax?anyAxes object to plot on. If undefined, a new figure and axes is created.
opts.kwargs?anyAdditional keyword arguments to be passed to the plot\_method.
opts.plot_method?"contourf" | "contour" | "pcolormesh"Plotting method to call when plotting the response. Please refer to the following matplotlib documentation for details: contourf (opens in a new tab), contour (opens in a new tab), pcolormesh (opens in a new tab). Default Value 'contourf'
opts.xlabel?stringOverwrite the x-axis label.
opts.ylabel?stringOverwrite the y-axis label.

Returns

Promise<any>

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:238 (opens in a new tab)

Properties

_isDisposed

boolean = false

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:23 (opens in a new tab)

_isInitialized

boolean = false

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:22 (opens in a new tab)

_py

PythonBridge

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:21 (opens in a new tab)

id

string

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:18 (opens in a new tab)

opts

any

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:19 (opens in a new tab)

Accessors

ax_

Axes with confusion matrix.

Signature

ax_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:326 (opens in a new tab)

figure_

Figure containing the confusion matrix.

Signature

figure_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:353 (opens in a new tab)

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:55 (opens in a new tab)

Signature

py(pythonBridge: PythonBridge): void;

Parameters

NameType
pythonBridgePythonBridge

Returns

void

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:59 (opens in a new tab)

surface_

If plot\_method is ‘contour’ or ‘contourf’, surface\_ is a QuadContourSet (opens in a new tab). If plot\_method is ‘pcolormesh’, surface\_ is a QuadMesh (opens in a new tab).

Signature

surface_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/inspection/DecisionBoundaryDisplay.ts:299 (opens in a new tab)