kaishi.core.labelers.validation_and_test

Class definition for validation and test labeler.

Module Contents

class kaishi.core.labelers.validation_and_test.LabelerValidationAndTest

Bases: kaishi.core.pipeline_component.PipelineComponent

Assign validation and/or test data labels.

__call__(self, dataset)
configure(self, val_frac: float = 0.2, test_frac: float = 0.0, seed=None)

Configure the labeler (note: any nonlabeled data point is automatically assigned a “TRAIN” label).

Parameters
  • val_frac (float) – fraction of data points to assign “VALIDATE” label

  • test_frac (float) – fraction of data points to assign “TEST” label

  • seed (int) – random seed for reproducibility