mlrl.testbed_sklearn.experiments.output.label_vectors.label_vector_histogram module

Author: Michael Rapp (michael.rapp.ml@gmail.com)

Provides classes that provide access to unique label vectors.

class mlrl.testbed_sklearn.experiments.output.label_vectors.label_vector_histogram.LabelVector(label_indices: ndarray, frequency: int)

Bases: object

A label vector.

Attributes:

label_indices: The indices of all relevant labels in the label vector frequency: The frequency of the label vector

frequency: int
label_indices: ndarray
class mlrl.testbed_sklearn.experiments.output.label_vectors.label_vector_histogram.LabelVectorHistogram(unique_label_vectors: list[LabelVector] | None = None)

Bases: object

Stores unique label vectors and their respective frequency.

static from_dataset(dataset: TabularDataset) LabelVectorHistogram

Creates and returns a LabelVectorHistogram that stores all unique label vectors contained in a dataset.

Parameters:

dataset – The dataset

Returns:

The LabelVectorHistogram that has been created