Package com.yahoo.labs.samoa.instances
Interface Prediction
-
- All Known Implementing Classes:
MultiLabelPrediction
public interface Prediction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getVote(int outputAttributeIndex, int classIndex)
The vote assigned to a class of an output attributedouble[]
getVotes()
The votes for the first output attributedouble[]
getVotes(int outputAttributeIndex)
The votes for a given output attributeboolean
hasVotesForAttribute(int outputAttributeIndex)
Checks if there are votes for a given output attributeint
numClasses(int outputAttributeIndex)
Different output attributes may have different number of classes.int
numOutputAttributes()
Number of output attributes.void
setVote(int outputAttributeIndex, int classIndex, double vote)
Sets the vote for class of a given output attributevoid
setVotes(double[] votes)
Sets the votes for the first output attributevoid
setVotes(int outputAttributeIndex, double[] votes)
Sets the votes for a given output attributeint
size()
The size of the prediction, that is the number of output attributesString
toString()
The text of the prediction, that is the description of the values of the prediction
-
-
-
Method Detail
-
numOutputAttributes
int numOutputAttributes()
Number of output attributes.- Returns:
- the number of output attributes
-
numClasses
int numClasses(int outputAttributeIndex)
Different output attributes may have different number of classes. Regressors have one class per output attribute.- Returns:
- the number of classes for attribute attributeIndex
-
getVotes
double[] getVotes(int outputAttributeIndex)
The votes for a given output attribute- Returns:
- the votes for a given output attribute outputAttributeIndex.
-
getVote
double getVote(int outputAttributeIndex, int classIndex)
The vote assigned to a class of an output attribute- Returns:
- the vote for an output attribute outputAttributeIndex and a class classIndex.
-
setVotes
void setVotes(int outputAttributeIndex, double[] votes)
Sets the votes for a given output attribute
-
setVotes
void setVotes(double[] votes)
Sets the votes for the first output attribute
-
setVote
void setVote(int outputAttributeIndex, int classIndex, double vote)
Sets the vote for class of a given output attribute
-
getVotes
double[] getVotes()
The votes for the first output attribute- Returns:
- the votes for the first output attribute outputAttributeIndex.
-
hasVotesForAttribute
boolean hasVotesForAttribute(int outputAttributeIndex)
Checks if there are votes for a given output attribute- Returns:
- the votes for the first output attribute outputAttributeIndex.
-
size
int size()
The size of the prediction, that is the number of output attributes- Returns:
- the votes for the first output attribute outputAttributeIndex.
-
-