Prediction
, java.io.Serializable
public class MultiLabelPrediction extends java.lang.Object implements Prediction, java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected DoubleVector[] |
prediction |
Constructor | Description |
---|---|
MultiLabelPrediction() |
|
MultiLabelPrediction(int numOutputAttributes) |
Modifier and Type | Method | Description |
---|---|---|
double |
getVote(int outputAttributeIndex,
int classIndex) |
The vote assigned to a class of an output attribute
|
double[] |
getVotes() |
The votes for the first output attribute
|
double[] |
getVotes(int outputAttributeIndex) |
The votes for a given output attribute
|
boolean |
hasVotesForAttribute(int outputAttributeIndex) |
Checks if there are votes for a given output attribute
|
int |
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 attribute
|
void |
setVotes(double[] votes) |
Sets the votes for the first output attribute
|
void |
setVotes(int outputAttributeIndex,
double[] votes) |
Sets the votes for a given output attribute
|
int |
size() |
The size of the prediction, that is the number of output attributes
|
java.lang.String |
toString() |
The text of the prediction, that is the description of the values of the prediction
|
protected DoubleVector[] prediction
public MultiLabelPrediction()
public MultiLabelPrediction(int numOutputAttributes)
public int numOutputAttributes()
Prediction
numOutputAttributes
in interface Prediction
public int numClasses(int outputAttributeIndex)
Prediction
numClasses
in interface Prediction
public double[] getVotes(int outputAttributeIndex)
Prediction
getVotes
in interface Prediction
public double[] getVotes()
Prediction
getVotes
in interface Prediction
public double getVote(int outputAttributeIndex, int classIndex)
Prediction
getVote
in interface Prediction
public void setVotes(int outputAttributeIndex, double[] votes)
Prediction
setVotes
in interface Prediction
public void setVotes(double[] votes)
Prediction
setVotes
in interface Prediction
public void setVote(int outputAttributeIndex, int classIndex, double vote)
Prediction
setVote
in interface Prediction
public java.lang.String toString()
Prediction
toString
in interface Prediction
toString
in class java.lang.Object
public boolean hasVotesForAttribute(int outputAttributeIndex)
Prediction
hasVotesForAttribute
in interface Prediction
public int size()
Prediction
size
in interface Prediction
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.