public interface Dataset
Example
sModifier 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 Example s 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
Example s in the dataset |
int |
getNumberOfNegativeExamples(Label positiveClass)
Returns the number of negative
Example s of a given class |
int |
getNumberOfPositiveExamples(Label positiveClass)
Returns the number of positive
Example s 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 Example
s stored in the Dataset or a fewer number
if n
examples are not available.n Example
sList<Example> getNextExamples(int n)
Example
stored in the Datasetn
- the number of examples to be returnedExample
boolean hasNextExample()
true
if and only if there is at least another Example in the datasetvoid reset()
int getNumberOfPositiveExamples(Label positiveClass)
Example
s of a given classpositiveClass
- the class whose number of positive Example
s are requiredExample
s of positiveClassint getNumberOfNegativeExamples(Label positiveClass)
Example
s of a given classpositiveClass
- the class whose number of negative Example
s are requiredExample
s of positiveClassint getNumberOfExamples()
Example
s in the datasetExample
s 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.