struct.classification
Class ClassificationLabel

java.lang.Object
  extended by struct.classification.ClassificationLabel
All Implemented Interfaces:
SLLabel

public class ClassificationLabel
extends java.lang.Object
implements SLLabel

Internal representation of the target label of a classification instance.

Version:
08/20/2006

Field Summary
private  SLFeatureVector fv
           
private  java.lang.String tag
           
 
Constructor Summary
protected ClassificationLabel(java.lang.String tag, SLFeatureVector fv)
           
 
Method Summary
 SLFeatureVector getFeatureVectorRepresentation()
          Returns the feature-vector representation of this label.
protected  java.lang.String getTag()
           
private  int hammingDistance(SLLabel pred)
           
 double loss(SLLabel pred)
          Evaluates a prediction against this label
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

private java.lang.String tag

fv

private SLFeatureVector fv
Constructor Detail

ClassificationLabel

protected ClassificationLabel(java.lang.String tag,
                              SLFeatureVector fv)
Parameters:
tag - - The string representing the target label.
fv - - The SLFeatureVector containing all the features specific to this label.
Method Detail

getFeatureVectorRepresentation

public SLFeatureVector getFeatureVectorRepresentation()
Description copied from interface: SLLabel
Returns the feature-vector representation of this label.

Specified by:
getFeatureVectorRepresentation in interface SLLabel

loss

public double loss(SLLabel pred)
Evaluates a prediction against this label

Specified by:
loss in interface SLLabel

hammingDistance

private int hammingDistance(SLLabel pred)

getTag

protected java.lang.String getTag()


Copyright (C) 2006 University of Pennsylvania.