DocumentationClassesDetCurveDisplay

Class: DetCurveDisplay

DET curve visualization.

It is recommend to use from_estimator or from_predictions to create a visualizer. All parameters are stored as attributes.

Read more in the User Guide.

Python Reference

Constructors

new DetCurveDisplay()

new DetCurveDisplay(opts?): DetCurveDisplay

Parameters

ParameterTypeDescription
opts?object-
opts.estimator_name?stringName of estimator. If undefined, the estimator name is not shown.
opts.fnr?ArrayLikeFalse negative rate.
opts.fpr?ArrayLikeFalse positive rate.
opts.pos_label?string | number | booleanThe label of the positive class.

Returns DetCurveDisplay

Defined in generated/metrics/DetCurveDisplay.ts:25

Properties

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

Accessors

ax_

Get Signature

get ax_(): Promise<any>

Axes with DET Curve.

Returns Promise<any>

Defined in generated/metrics/DetCurveDisplay.ts:326


figure_

Get Signature

get figure_(): Promise<any>

Figure containing the curve.

Returns Promise<any>

Defined in generated/metrics/DetCurveDisplay.ts:349


line_

Get Signature

get line_(): Promise<any>

DET Curve.

Returns Promise<any>

Defined in generated/metrics/DetCurveDisplay.ts:303


py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/metrics/DetCurveDisplay.ts:50

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/metrics/DetCurveDisplay.ts:102


from_estimator()

from_estimator(opts): Promise<any>

Plot DET curve given an estimator and data.

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.estimator?anyFitted classifier or a fitted Pipeline in which the last estimator is a classifier.
opts.kwargs?anyAdditional keywords arguments passed to matplotlib plot function.
opts.name?stringName of DET curve for labeling. If undefined, use the name of the estimator.
opts.pos_label?string | number | booleanThe label of the positive class. When pos_label=None, if y_true is in {-1, 1} or {0, 1}, pos_label is set to 1, otherwise an error will be raised.
opts.response_method?"decision_function" | "auto’} default=’auto"Specifies whether to use predict_proba or decision_function as the predicted target response. If set to ‘auto’, predict_proba is tried first and if it does not exist decision_function is tried next.
opts.sample_weight?ArrayLikeSample weights.
opts.X?ArrayLikeInput values.
opts.y?ArrayLikeTarget values.

Returns Promise<any>

Defined in generated/metrics/DetCurveDisplay.ts:121


from_predictions()

from_predictions(opts): Promise<any>

Plot the DET curve given the true and predicted labels.

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.kwargs?anyAdditional keywords arguments passed to matplotlib plot function.
opts.name?stringName of DET curve for labeling. If undefined, name will be set to "Classifier".
opts.pos_label?string | number | booleanThe label of the positive class. When pos_label=None, if y_true is in {-1, 1} or {0, 1}, pos_label is set to 1, otherwise an error will be raised.
opts.sample_weight?ArrayLikeSample weights.
opts.y_pred?ArrayLikeTarget scores, can either be probability estimates of the positive class, confidence values, or non-thresholded measure of decisions (as returned by decision_function on some classifiers).
opts.y_true?ArrayLikeTrue labels.

Returns Promise<any>

Defined in generated/metrics/DetCurveDisplay.ts:197


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/metrics/DetCurveDisplay.ts:63


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 keywords arguments passed to matplotlib plot function.
opts.name?stringName of DET curve for labeling. If undefined, use estimator_name if it is not undefined, otherwise no labeling is shown.

Returns Promise<any>

Defined in generated/metrics/DetCurveDisplay.ts:261