Class MultiLabelDataGenerator
java.lang.Object
org.tribuo.multilabel.example.MultiLabelDataGenerator
Generates three example train and test datasets, used for unit testing.
They don't necessarily have sensible classification boundaries,
it's for testing the machinery rather than accuracy.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Example
<MultiLabel> Generates an example with no features.static com.oracle.labs.mlrg.olcut.util.Pair
<Dataset<MultiLabel>, Dataset<MultiLabel>> static Dataset
<MultiLabel> static Dataset
<MultiLabel> static Example
<MultiLabel> Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class.
-
Method Details
-
generateTrainData
-
generateTestData
-
generateDataset
public static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<MultiLabel>, Dataset<MultiLabel>> generateDataset() -
invalidSparseExample
Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class. This should make the example empty at prediction time.- Returns:
- An example with features {1:1.0,5:5.0,8:8.0}.
-
emptyExample
Generates an example with no features.- Returns:
- An example with no features.
-