public class SequenceDataset extends SimpleDataset
SequenceExamples| Constructor 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, shuffleExamplespublic List<Label> getClassificationLabels()
DatasetgetClassificationLabels in interface DatasetgetClassificationLabels in class SimpleDatasetpublic List<SequenceExample> getSequenceExamples()
public void populate(String inputFilePath) throws IOException, InstantiationException, ParsingExampleException
SimpleDatasetpopulate in class SimpleDatasetinputFilePath - the path of the file to be readIOExceptionInstantiationExceptionParsingExampleExceptionpublic SequenceDataset[] split(float percentage)
SimpleDatasetpercentage. 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 SimpleDatasetpercentage - should be a number in [0,1]public SequenceDataset[] splitClassDistributionInvariant(float percentage)
SimpleDatasetpercentage. 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 SimpleDatasetpercentage - should be a number in [0,1]Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.