Class SequenceDataGenerator
java.lang.Object
org.tribuo.classification.sequence.example.SequenceDataGenerator
A data generator for smoke testing sequence label models.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SequenceExample<Label>
This generates a sequence example with no examples.static SequenceExample<Label>
Generates a sequence example with a mixture of features and three labels "O", "Status" and "Monkey".static SequenceExample<Label>
Generates a sequence example with a mixture of features and three labels "O", "Status" and "Monkey".static MutableSequenceDataset<Label>
generateGorillaDataset
(int numCopies) Generates a simple dataset consisting of numCopies repeats of two sequences.static SequenceExample<Label>
This generates a sequence example with features that are unused by the training data.static SequenceExample<Label>
This generates a sequence example where the first example has no features.
-
Method Details
-
generateGorillaDataset
Generates a simple dataset consisting of numCopies repeats of two sequences.- Parameters:
numCopies
- The number of times to repeat the two sequence examples.- Returns:
- The dataset.
-
generateGorillaA
Generates a sequence example with a mixture of features and three labels "O", "Status" and "Monkey".- Returns:
- A sequence example.
-
generateGorillaB
Generates a sequence example with a mixture of features and three labels "O", "Status" and "Monkey".- Returns:
- A sequence example.
-
generateInvalidExample
This generates a sequence example with features that are unused by the training data.- Returns:
- A
SequenceExample
which is invalid in the context of the Gorilla example data.
-
generateOtherInvalidExample
This generates a sequence example where the first example has no features.- Returns:
- A
SequenceExample
which is invalid as one example contains no features.
-
generateEmptyExample
This generates a sequence example with no examples.- Returns:
- A
SequenceExample
which is invalid as it contains no examples.
-