struct.sequence
Class SequenceLabel

java.lang.Object
  extended by struct.sequence.SequenceLabel
All Implemented Interfaces:
SLLabel

public class SequenceLabel
extends java.lang.Object
implements SLLabel

A sequence label.

Version:
07/15/2006

Field Summary
 SLFeatureVector fv
           
 java.lang.String[] tags
           
 
Constructor Summary
SequenceLabel(java.lang.String[] tags, SLFeatureVector fv)
           
 
Method Summary
 int correct(SLLabel pred)
          1 - hammingDistance
 SLFeatureVector getFeatureVectorRepresentation()
          Returns the feature-vector representation of this label.
 int hammingDistance(SLLabel pred)
          Computes hamming distance.
 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

tags

public java.lang.String[] tags

fv

public SLFeatureVector fv
Constructor Detail

SequenceLabel

public SequenceLabel(java.lang.String[] tags,
                     SLFeatureVector fv)
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)
Description copied from interface: SLLabel
Evaluates a prediction against this label.

Specified by:
loss in interface SLLabel

hammingDistance

public int hammingDistance(SLLabel pred)
Computes hamming distance.


correct

public int correct(SLLabel pred)
1 - hammingDistance



Copyright (C) 2006 University of Pennsylvania.