tarexp.component.labeler module#

A tarexp.component.labeler.Labeler instance simulates human review. For most TAR experiments, we assume we simply look up the gold label of each document using tarexp.component.labeler.PerfectLabeler. Random errors can be introduced using tarexp.component.labeler.SuccessProbLabeler.

class tarexp.component.labeler.Labeler(**kwargs)[source]#

Bases: Component

labelDocs(doc_ids, *args, **kwargs)[source]#
class tarexp.component.labeler.PerfectLabeler(**kwargs)[source]#

Bases: Labeler

begin(dataset: Dataset, **kwargs)[source]#
reset()[source]#
labelDocs(doc_ids, **kwargs)[source]#
class tarexp.component.labeler.SuccessProbLabeler(success_prob=0.5, **kwargs)[source]#

Bases: Labeler

begin(dataset: Dataset, **kwargs)[source]#
reset()[source]#
labelDocs(doc_ids, random: RandomState, **kwargs)[source]#