rdr.mulan
Class Prediction
java.lang.Object
rdr.mulan.Prediction
public class Prediction
- extends java.lang.Object
Simple container class for multilabel classification result
Constructor Summary |
Prediction(double[] labels,
double[] confidences)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Prediction
public Prediction(double[] labels,
double[] confidences)
getConfidences
public double[] getConfidences()
getPredictedLabels
public double[] getPredictedLabels()
getPrediction
public boolean getPrediction(int label)
setPrediction
public void setPrediction(int label,
boolean value)
- Parameters:
label:
- the index of a labelvalue:
- whether this label is predicted as true or not
getConfidence
public double getConfidence(int label)
- Parameters:
label:
- the index of a label
- Returns:
- the confidence of the truth (1) of this label
numLabels
public int numLabels()
- Number of predicted labels for this instance.
toString
public java.lang.String toString()
- String representation of the set of labels. Perhaps we
could obtain the actual attribute names from somewhere?
- Overrides:
toString
in class java.lang.Object