compute_vote_vectors#
- skactiveml.utils.compute_vote_vectors(y, w=None, classes=None, missing_label=nan)[source]#
Counts number of votes per class label for each sample.
- Parameters:
- yarray-like, shape (n_samples) or (n_samples, n_annotators)
Class labels, which may contain also missing labels.
- warray-like, shape (n_samples) or (n_samples, n_annotators) or None, default=None
Class label weights. One-dimensional weights apply to every annotation of the corresponding sample. Two-dimensional weights specify one weight per annotation. If None, every annotation has unit weight.
- classesarray-like of shape (n_classes,), default=None
Holds the label for each class.
- missing_labelscalar or string or np.nan orNone, default=np.nan
Value to represent a missing label.
- Returns:
- vnumpy.ndarray of shape (n_samples, n_classes)
V[i,j] counts number of votes per class j for sample i.