rdr.mulan
Class Prediction

java.lang.Object
  extended by rdr.mulan.Prediction

public class Prediction
extends java.lang.Object

Simple container class for multilabel classification result


Constructor Summary
Prediction(double[] labels, double[] confidences)
           
 
Method Summary
 double getConfidence(int label)
           
 double[] getConfidences()
           
 double[] getPredictedLabels()
           
 boolean getPrediction(int label)
           
 int numLabels()
          Number of predicted labels for this instance.
 void setPrediction(int label, boolean value)
           
 java.lang.String toString()
          String representation of the set of labels.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Prediction

public Prediction(double[] labels,
                  double[] confidences)
Method Detail

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 label
value: - 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