tarexp.component.sampler module#

TARexp provides reference implementations of a variety of TAR-specific algorithms, to aid reproducibility and reduce experimenter work. For instance, uncertainty sampling [1], relevance feedback [2], and simple random sampling batch selection algorithms are provided.

This interface is inspired by libact, an Active Learning library.

See also

class tarexp.component.sampler.Sampler(**kwargs)[source]#

Bases: Component

sampleDocs(nask: int, ledger: Ledger, scores, *args, **kwargs)[source]#
class tarexp.component.sampler.UncertaintySampler(**kwargs)[source]#

Bases: Sampler

Implementing least confidence uncertainty sampling.

sampleDocs(nask: int, ledger: Ledger, scores, **kwargs)[source]#
freeze()[source]#
class tarexp.component.sampler.RelevanceSampler(**kwargs)[source]#

Bases: Sampler

sampleDocs(nask: int, ledger: Ledger, scores, **kwargs)[source]#
class tarexp.component.sampler.RandomSampler(**kwargs)[source]#

Bases: Sampler

begin(random_seed=None, *args, **kwargs)[source]#
sampleDocs(nask: int, ledger: Ledger, scores=None, dist=None, **kwargs)[source]#