DocumentationClassesDecisionBoundaryDisplay

Class: 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

Constructors

new DecisionBoundaryDisplay()

new DecisionBoundaryDisplay(opts?): DecisionBoundaryDisplay

Parameters

ParameterTypeDescription
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.
opts.xx1?ArrayLike[]Second output of meshgrid.
opts.ylabel?stringDefault label to place on y axis.

Returns DecisionBoundaryDisplay

Defined in generated/inspection/DecisionBoundaryDisplay.ts:25

Properties

PropertyTypeDefault valueDefined in
_isDisposedbooleanfalsegenerated/inspection/DecisionBoundaryDisplay.ts:23
_isInitializedbooleanfalsegenerated/inspection/DecisionBoundaryDisplay.ts:22
_pyPythonBridgeundefinedgenerated/inspection/DecisionBoundaryDisplay.ts:21
idstringundefinedgenerated/inspection/DecisionBoundaryDisplay.ts:18
optsanyundefinedgenerated/inspection/DecisionBoundaryDisplay.ts:19

Accessors

ax_

Get Signature

get ax_(): Promise<any>

Axes with decision boundary.

Returns Promise<any>

Defined in generated/inspection/DecisionBoundaryDisplay.ts:307


figure_

Get Signature

get figure_(): Promise<any>

Figure containing the decision boundary.

Returns Promise<any>

Defined in generated/inspection/DecisionBoundaryDisplay.ts:334


py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/inspection/DecisionBoundaryDisplay.ts:55


surface_

Get Signature

get surface_(): Promise<any>

If plot_method is ‘contour’ or ‘contourf’, surface_ is a QuadContourSet. If plot_method is ‘pcolormesh’, surface_ is a QuadMesh.

Returns Promise<any>

Defined in generated/inspection/DecisionBoundaryDisplay.ts:280

Methods

dispose()

dispose(): Promise<void>

Disposes of the underlying Python resources.

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

Returns Promise<void>

Defined in generated/inspection/DecisionBoundaryDisplay.ts:111


from_estimator()

from_estimator(opts): Promise<any>

Plot decision boundary given an estimator.

Read more in the User Guide.

Parameters

ParameterTypeDescription
optsobject-
opts.ax?anyAxes object to plot on. If undefined, a new figure and axes is created.
opts.class_of_interest?string | number | booleanThe class considered when plotting the decision. If undefined, estimator.classes_\[1\] is considered as the positive class for binary classifiers. Must have an explicit value for multiclass classifiers when response_method is ‘predict_proba’ or ‘decision_function’.
opts.eps?numberExtends the minimum and maximum values of X for evaluating the response function.
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.
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, contour, pcolormesh.
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".
opts.X?ArrayLikeInput data that should be only 2-dimensional.
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:130


init()

init(py): Promise<void>

Initializes the underlying Python resources.

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

Parameters

ParameterType
pyPythonBridge

Returns Promise<void>

Defined in generated/inspection/DecisionBoundaryDisplay.ts:68


plot()

plot(opts): Promise<any>

Plot visualization.

Parameters

ParameterTypeDescription
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, contour, pcolormesh.
opts.xlabel?stringOverwrite the x-axis label.
opts.ylabel?stringOverwrite the y-axis label.

Returns Promise<any>

Defined in generated/inspection/DecisionBoundaryDisplay.ts:224