Documentation
Classes
DetCurveDisplay

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 (opens in a new tab)

Constructors

constructor()

Signature

new DetCurveDisplay(opts?: object): DetCurveDisplay;

Parameters

NameTypeDescription
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 | numberThe label of the positive class.

Returns

DetCurveDisplay

Defined in: generated/metrics/DetCurveDisplay.ts:25 (opens in a new tab)

Properties

_isDisposed

boolean = false

Defined in: generated/metrics/DetCurveDisplay.ts:23 (opens in a new tab)

_isInitialized

boolean = false

Defined in: generated/metrics/DetCurveDisplay.ts:22 (opens in a new tab)

_py

PythonBridge

Defined in: generated/metrics/DetCurveDisplay.ts:21 (opens in a new tab)

id

string

Defined in: generated/metrics/DetCurveDisplay.ts:18 (opens in a new tab)

opts

any

Defined in: generated/metrics/DetCurveDisplay.ts:19 (opens in a new tab)

Accessors

ax_

Axes with DET Curve.

Signature

ax_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/metrics/DetCurveDisplay.ts:361 (opens in a new tab)

figure_

Figure containing the curve.

Signature

figure_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/metrics/DetCurveDisplay.ts:384 (opens in a new tab)

line_

DET Curve.

Signature

line_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/metrics/DetCurveDisplay.ts:338 (opens in a new tab)

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/metrics/DetCurveDisplay.ts:50 (opens in a new tab)

Signature

py(pythonBridge: PythonBridge): void;

Parameters

NameType
pythonBridgePythonBridge

Returns

void

Defined in: generated/metrics/DetCurveDisplay.ts:54 (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/metrics/DetCurveDisplay.ts:107 (opens in a new tab)

from_estimator()

Plot DET curve given an estimator and data.

Read more in the User Guide.

Signature

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

Parameters

NameTypeDescription
optsobject-
opts.X?ArrayLikeInput values.
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 | numberThe 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.y?ArrayLikeTarget values.

Returns

Promise<any>

Defined in: generated/metrics/DetCurveDisplay.ts:126 (opens in a new tab)

from_predictions()

Plot the DET curve given the true and predicted labels.

Read more in the User Guide.

Signature

from_predictions(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 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 | numberThe 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:217 (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/metrics/DetCurveDisplay.ts:63 (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 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:293 (opens in a new tab)