package sklearn

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `PrecisionRecallDisplay
]
type t = [ `Object | `PrecisionRecallDisplay ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val create : ?average_precision:float -> ?estimator_name:string -> precision:[> `ArrayLike ] Np.Obj.t -> recall:[> `ArrayLike ] Np.Obj.t -> unit -> t

Precision Recall visualization.

It is recommend to use :func:`~sklearn.metrics.plot_precision_recall_curve` to create a visualizer. All parameters are stored as attributes.

Read more in the :ref:`User Guide <visualizations>`.

Parameters ----------- precision : ndarray Precision values.

recall : ndarray Recall values.

average_precision : float, default=None Average precision. If None, the average precision is not shown.

estimator_name : str, default=None Name of estimator. If None, then the estimator name is not shown.

Attributes ---------- line_ : matplotlib Artist Precision recall curve.

ax_ : matplotlib Axes Axes with precision recall curve.

figure_ : matplotlib Figure Figure containing the curve.

val plot : ?ax:Py.Object.t -> ?name:string -> ?kwargs:(string * Py.Object.t) list -> [> tag ] Obj.t -> Py.Object.t

Plot visualization.

Extra keyword arguments will be passed to matplotlib's `plot`.

Parameters ---------- ax : Matplotlib Axes, default=None Axes object to plot on. If `None`, a new figure and axes is created.

name : str, default=None Name of precision recall curve for labeling. If `None`, use the name of the estimator.

**kwargs : dict Keyword arguments to be passed to matplotlib's `plot`.

Returns ------- display : :class:`~sklearn.metrics.PrecisionRecallDisplay` Object that stores computed values.

val line_ : t -> Py.Object.t

Attribute line_: get value or raise Not_found if None.

val line_opt : t -> Py.Object.t option

Attribute line_: get value as an option.

val ax_ : t -> Py.Object.t

Attribute ax_: get value or raise Not_found if None.

val ax_opt : t -> Py.Object.t option

Attribute ax_: get value as an option.

val figure_ : t -> Py.Object.t

Attribute figure_: get value or raise Not_found if None.

val figure_opt : t -> Py.Object.t option

Attribute figure_: get value as an option.

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

val pp : Stdlib.Format.formatter -> t -> unit

Pretty-print the object to a formatter.