struct.classification
Class ClassificationPrediction

java.lang.Object
  extended by struct.classification.ClassificationPrediction
All Implemented Interfaces:
Prediction

public class ClassificationPrediction
extends java.lang.Object
implements Prediction

A set of predicted labels, in order.

Version:
08/20/2006

Field Summary
private  ClassificationLabel[] labels
           
private  double[] scores
           
 
Constructor Summary
protected ClassificationPrediction(ClassificationLabel[] labels, double[] scores)
           
 
Method Summary
 ClassificationLabel getBestLabel()
          Returns the best label according to this prediction.
 ClassificationLabel getLabelByRank(int rank)
          Returns the label by rank according to this prediction.
protected  int getNumLabels()
           
protected  double[] getScores()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

labels

private ClassificationLabel[] labels

scores

private double[] scores
Constructor Detail

ClassificationPrediction

protected ClassificationPrediction(ClassificationLabel[] labels,
                                   double[] scores)
Method Detail

getBestLabel

public ClassificationLabel getBestLabel()
Description copied from interface: Prediction
Returns the best label according to this prediction.

Specified by:
getBestLabel in interface Prediction

getLabelByRank

public ClassificationLabel getLabelByRank(int rank)
Description copied from interface: Prediction
Returns the label by rank according to this prediction.

Specified by:
getLabelByRank in interface Prediction

getNumLabels

protected int getNumLabels()

getScores

protected double[] getScores()


Copyright (C) 2006 University of Pennsylvania.