public interface Dataset
Examples| Modifier and Type | Method and Description |
|---|---|
void |
addExample(Example e) |
List<Label> |
getClassificationLabels()
Returns all the classification labels in the dataset.
|
List<Example> |
getExamples()
Returns an array containing all the stored examples
|
Example |
getNextExample()
Returns the next
n Examples stored in the Dataset or a fewer number
if n examples are not available. |
List<Example> |
getNextExamples(int n)
Returns the next
Example stored in the Dataset |
int |
getNumberOfExamples()
Returns the number of
Examples in the dataset |
int |
getNumberOfNegativeExamples(Label positiveClass)
Returns the number of negative
Examples of a given class |
int |
getNumberOfPositiveExamples(Label positiveClass)
Returns the number of positive
Examples of a given class |
Example |
getRandExample() |
List<Example> |
getRandExamples(int k) |
List<Label> |
getRegressionProperties()
Returns all the regression properties in the dataset.
|
Dataset |
getShuffledDataset() |
Vector |
getZeroVector(String representationIdentifier)
Returns a zero vector compliant with the representation identifier by
representationIdentifier containings all zero |
boolean |
hasNextExample()
Returns a boolean declaring whether there are other Examples in the dataset
|
void |
manipulate(Manipulator... manipulators)
Manipulates all the examples in the dataset accordingly to the strategies defined by the given
manipulators. |
void |
reset()
Reset the reading pointer
|
void |
setSeed(long seed)
Sets the seed of the random generator used to shuffling examples and getting random examples
|
void addExample(Example e)
Example getNextExample()
n Examples stored in the Dataset or a fewer number
if n examples are not available.n ExamplesList<Example> getNextExamples(int n)
Example stored in the Datasetn - the number of examples to be returnedExampleboolean hasNextExample()
true if and only if there is at least another Example in the datasetvoid reset()
int getNumberOfPositiveExamples(Label positiveClass)
Examples of a given classpositiveClass - the class whose number of positive Examples are requiredExamples of positiveClassint getNumberOfNegativeExamples(Label positiveClass)
Examples of a given classpositiveClass - the class whose number of negative Examples are requiredExamples of positiveClassint getNumberOfExamples()
Examples in the datasetExamples in the datasetList<Label> getClassificationLabels()
List<Label> getRegressionProperties()
List<Example> getExamples()
Vector getZeroVector(String representationIdentifier)
representationIdentifier containings all zerorepresentationIdentifier - the identifier of the representationrepresentationIdentifier containings all zeroExample getRandExample()
List<Example> getRandExamples(int k)
k - the number of examples to be returnedk random examplesDataset getShuffledDataset()
void setSeed(long seed)
seed - the seed of the random generatorvoid manipulate(Manipulator... manipulators)
manipulators.
manipulator in the arraymanipulators - the manipulators that must be applied to all the examples in the datasetCopyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.