public class SimpleExample extends Example
Example
composed by a set of Representation
s.Constructor and Description |
---|
SimpleExample()
Initializes an empty example (0 labels and 0 representations)
|
SimpleExample(Label[] labels,
HashMap<String,Representation> representations)
Initializes a SimpleExample with the input representations and labels
|
Modifier and Type | Method and Description |
---|---|
void |
addRepresentation(String representationName,
Representation representation)
Adds a representation to this example
|
boolean |
equals(Object example) |
boolean |
equalsIgnoreLabels(SimpleExample example)
Asserts whether this example and the input one have identical
representations, ignoring their labels
|
int |
getNumberOfRepresentations()
Returns the number of representations in which this example is modeled
|
Representation |
getRepresentation(String representationName)
Returns the representation corresponding to
representationName |
Map<String,Representation> |
getRepresentations()
Returns the example representations
|
Vector |
getZeroVector(String representationIdentifier) |
void |
manipulate(Manipulator manipulator)
Manipulate this example accordingly to the provided
manipulator |
String |
printExample(String... representations) |
void |
setRepresentations(HashMap<String,Representation> representations)
Sets the example representations
|
String |
toString() |
addLabel, clone, getClassificationLabels, getId, getLabels, getNumberOfClassificationLabels, getNumberOfRegressionLabels, getRegressionLabels, getRegressionValue, getRegressionValues, getTextualLabelPart, isExampleOf, setClassificationLabels, setLabels, setRegressionValues
public SimpleExample()
public SimpleExample(Label[] labels, HashMap<String,Representation> representations)
labels
- the classes whose this instance is a positive examplerepresentations
- the various representations in which the instance is
representedpublic void setRepresentations(HashMap<String,Representation> representations)
Example
setRepresentations
in class Example
representations
- to associate to this examplepublic Map<String,Representation> getRepresentations()
Example
getRepresentations
in class Example
public void addRepresentation(String representationName, Representation representation)
Example
addRepresentation
in class Example
representationName
- the identifier of the representation to be addedrepresentation
- the representation to be addedpublic int getNumberOfRepresentations()
Example
getNumberOfRepresentations
in class Example
public Representation getRepresentation(String representationName)
Example
representationName
getRepresentation
in class Example
representationName
- it is a representation identifierrepresentationName
public boolean equalsIgnoreLabels(SimpleExample example)
example
- public Vector getZeroVector(String representationIdentifier)
getZeroVector
in class Example
public void manipulate(Manipulator manipulator)
Example
manipulator
manipulate
in class Example
manipulator
- the manipulatorCopyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.