skactiveml.visualization.plot_utilities#

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

Plot the utility for the given single-annotator query strategy.

Parameters
qsskactiveml.base.SingleAnnotatorPoolQueryStrategy

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 self.MISSING_LABEL).

candidatesNone or array-like of shape (n_candidates,), dtype=int or
array-like of shape (n_candidates, n_features),
optional (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, n_features), the candidates are directly given in candidates (not necessarily contained in X). This is not supported by all query strategies.

Returns
axmatplotlib.axes.Axes

The axis on which the utilities were plotted.

Other Parameters
replace_nannumeric or None, optional (default=0.0)

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

ignore_undefined_query_paramsbool, optional (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]], optional
(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.

axmatplotlib.axes.Axes, optional (default=None)

The axis on which the utility is plotted. Only if y.ndim = 1 (single annotator).

resint, optional (default=21)

The resolution of the plot.

contour_dictdict, optional (default=None)

Additional parameters for the utility contour.

**kwargs

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

Examples using skactiveml.visualization.plot_utilities#

Core Set

Core Set

Random Sampling

Random Sampling

Active Learning with Cost Embedding

Active Learning with Cost Embedding

Contrastive Active Learning (CAL)

Contrastive Active Learning (CAL)

Typical Clustering (TypiClust)

Typical Clustering (TypiClust)

Uncertainty Sampling with Entropy

Uncertainty Sampling with Entropy

Epistemic Uncertainty Sampling

Epistemic Uncertainty Sampling

Querying Informative and Representative Examples

Querying Informative and Representative Examples

Uncertainty Sampling with Margin

Uncertainty Sampling with Margin

Uncertainty Sampling with Least-Confidence

Uncertainty Sampling with Least-Confidence

Probability Coverage (ProbCover)

Probability Coverage (ProbCover)

Expected Average Precision

Expected Average Precision

Density-Diversity-Distribution-Distance Sampling

Density-Diversity-Distribution-Distance Sampling

Monte-Carlo EER with Log-Loss

Monte-Carlo EER with Log-Loss

Monte-Carlo EER with Misclassification-Loss

Monte-Carlo EER with Misclassification-Loss

Sub-sampling Wrapper

Sub-sampling Wrapper

Discriminative Active Learning

Discriminative Active Learning

Parallel Utility Estimation Wrapper

Parallel Utility Estimation Wrapper

Multi-class Probabilistic Active Learning

Multi-class Probabilistic Active Learning

Query-by-Committee (QBC) with Vote Entropy

Query-by-Committee (QBC) with Vote Entropy

Query-by-Committee (QBC) with Variation Ratios

Query-by-Committee (QBC) with Variation Ratios

Query-by-Committee (QBC) with Kullback-Leibler Divergence

Query-by-Committee (QBC) with Kullback-Leibler Divergence

Value of Information

Value of Information

Value of Information on Labeled Samples

Value of Information on Labeled Samples

Value of Information on Unlabeled Samples

Value of Information on Unlabeled Samples

Bayesian Active Learning by Disagreement (BALD)

Bayesian Active Learning by Disagreement (BALD)

Density-weighted Uncertainty Sampling

Density-weighted Uncertainty Sampling