public class SequenceDataset extends SimpleDataset
SequenceExample
sConstructor and Description |
---|
SequenceDataset() |
Modifier and Type | Method and Description |
---|---|
List<Label> |
getClassificationLabels()
Returns all the classification labels in the dataset.
|
List<SequenceExample> |
getSequenceExamples() |
void |
populate(String inputFilePath)
Populate the dataset by reading it from a KeLP
compliant file.
|
SequenceDataset[] |
split(float percentage)
Returns two datasets created by splitting this dataset accordingly to
percentage . |
SequenceDataset[] |
splitClassDistributionInvariant(float percentage)
Returns two datasets created by splitting this dataset accordingly to
percentage . |
addExample, addExamples, extractExamplesOfClasses, getExample, getExamples, getNextExample, getNextExamples, getNumberOfExamples, getNumberOfNegativeExamples, getNumberOfPositiveExamples, getRandExample, getRandExamples, getRegressionProperties, getShuffledDataset, getZeroVector, hasNextExample, isConsistent, manipulate, nFolding, nFoldingClassDistributionInvariant, populate, reset, save, setSeed, shuffleExamples
public List<Label> getClassificationLabels()
Dataset
getClassificationLabels
in interface Dataset
getClassificationLabels
in class SimpleDataset
public List<SequenceExample> getSequenceExamples()
public void populate(String inputFilePath) throws IOException, InstantiationException, ParsingExampleException
SimpleDataset
populate
in class SimpleDataset
inputFilePath
- the path of the file to be readIOException
InstantiationException
ParsingExampleException
public SequenceDataset[] split(float percentage)
SimpleDataset
percentage
. The examples are split accordingly to their
order without maintaining the original data distribution among the
classes. Thus the first dataset consists of the first
percentage
% of examples, while the second dataset consists
in all the remaining examplessplit
in class SimpleDataset
percentage
- should be a number in [0,1]public SequenceDataset[] splitClassDistributionInvariant(float percentage)
SimpleDataset
percentage
. The original distribution of the examples among
the classes is maintained in the two datasets. The examples are split
accordingly to their order. Thus the first dataset consists of the first
percentage
% of examples of each class, while the second
dataset consists in all the remaining examplessplitClassDistributionInvariant
in class SimpleDataset
percentage
- should be a number in [0,1]Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.