skactiveml.visualization.plot_annotator_utilities#

skactiveml.visualization.plot_annotator_utilities(qs, X, y, candidates=None, **kwargs)[source]#

Plot the utility for the given query strategy.

Parameters
qsskactiveml.base.MultiAnnotatorPoolQueryStrategy

The query strategy for which the utility is plotted.

Xarray-like of shape (n_samples, n_features)

Training data set, usually complete, i.e. including the labeled and unlabeled samples.

yarray-like of shape (n_samples,) or (n_samples, n_annotators)

Labels of the training data set (possibly including unlabeled ones indicated by qs.missing_label).

candidatesNone or array-like of shape (n_candidates), dtype=int or array-like of shape (n_candidates, n_features), default=None
  • If candidates is None, the unlabeled samples from (X,y) are considered as candidates.

  • If candidates is of shape (n_candidates,) and of type int, candidates is considered as the indices of the samples in (X,y).

  • If candidates is of shape (n_candidates, *), the candidate samples are directly given in candidates (not necessarily contained in X). This is not supported by all query strategies.

Returns
axesarray-like of shape (n_annotators_to_plot,)

The axes on which the utilities were plotted.

Other Parameters
replace_nannumeric or None, default=0.0

Only used if plotting with mesh samples is not possible. If numeric, the utility of labeled samples will be plotted with value replace_nan. If None, these samples will be ignored.

ignore_undefined_query_paramsbool, default=False

If True, query parameters that are not defined in the query function are ignored and will not raise an exception.

feature_boundarray-like of shape [[xmin, ymin], [xmax, ymax]], default=None

Determines the area in which the boundary is plotted. If candidates is not given, bound must not be None. Otherwise, the bound is determined based on the data.

axesarray-like of matplotlib.axes.Axes, default=None

The axes on which the utilities for the annotators are plotted. Only supported for y.ndim = 2 corresponding to a setting with multiple annotators.

resint, default=21

The resolution of the plot.

contour_dictdict, default=None

Additional parameters for the utility contour.

plot_annotatorsNone or array-like of shape (n_annotators_to_plot,), default=None

Contains the indices of the annotators to be plotted. If it is None, all annotators are plotted. Only supported for y.ndim = 2 corresponding to a setting with multiple annotators.

**kwargs

Remaining keyword arguments are passed the query function of the query strategy.