libact.labelers package

Submodules

libact.labelers.ideal_labeler module

Ideal/Noiseless labeler that returns true label

class libact.labelers.ideal_labeler.IdealLabeler(dataset, **kwargs)

Bases: libact.base.interfaces.Labeler

Provide the errorless/noiseless label to any feature vectors being queried.

Parameters:dataset (Dataset object) – Dataset object with the ground-truth label for each sample.
label(feature)

Return the class labels for the input feature array.

Parameters:feature (array-like, shape (n_features,)) – The feature vector whose label is to queried.
Returns:label – The class label of the queried feature.
Return type:int

libact.labelers.interactive_labeler module

Interactive Labeler

This module includes an InteractiveLabeler.

class libact.labelers.interactive_labeler.InteractiveLabeler(**kwargs)

Bases: libact.base.interfaces.Labeler

Interactive Labeler

InteractiveLabeler is a Labeler object that shows the feature through image using matplotlib and lets human label each feature through command line interface.

Parameters:label_name (list) – Let the label space be from 0 to len(label_name)-1, this list corresponds to each label’s name.
label(feature)

Return the class labels for the input feature array.

Parameters:feature (array-like, shape (n_features,)) – The feature vector whose label is to queried.
Returns:label – The class label of the queried feature.
Return type:int

Module contents

Concrete labeler classes.