LBJ2.classify
Class MultiValueComparer

java.lang.Object
  extended by LBJ2.classify.Classifier
      extended by LBJ2.classify.ValueComparer
          extended by LBJ2.classify.MultiValueComparer
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class MultiValueComparer
extends ValueComparer

This classifier applies another classifier to the example object and returns a Boolean feature (with value "true" or "false") indicating whether a given feature value appeared in the output of the classifier. This behavior differs from that of ValueComparer because it does not assume that the given classifier will return only a single feature.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class LBJ2.classify.ValueComparer
labeler, value
 
Fields inherited from class LBJ2.classify.Classifier
containingPackage, name
 
Constructor Summary
MultiValueComparer(Classifier c, java.lang.String v)
          Constructor.
 
Method Summary
 FeatureVector classify(java.lang.Object o)
          Returns a Boolean feature (with value "true" or "false") indicating whether the output of ValueComparer.labeler applied to the argument object contained the feature value referenced by ValueComparer.value.
 java.lang.String toString()
          The String representation of a ValueComparer has the form "ValueComparer(child), where child is the String representation of the classifier whose value is being compared.
 
Methods inherited from class LBJ2.classify.ValueComparer
allowableValues, getInputType, setLabeler
 
Methods inherited from class LBJ2.classify.Classifier
binaryRead, binaryRead, binaryRead, binaryRead, binaryWrite, binaryWrite, classify, clone, discreteValue, discreteValueArray, getCompositeChildren, getOutputType, realValue, realValueArray, test, valueIndexOf
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiValueComparer

public MultiValueComparer(Classifier c,
                          java.lang.String v)
Constructor.

Parameters:
c - The classifier whose value will be compared.
v - The value to compare with.
Method Detail

classify

public FeatureVector classify(java.lang.Object o)
Returns a Boolean feature (with value "true" or "false") indicating whether the output of ValueComparer.labeler applied to the argument object contained the feature value referenced by ValueComparer.value.

Overrides:
classify in class ValueComparer
Parameters:
o - The object to make decisions about.
Returns:
A feature vector containing the feature described above.

toString

public java.lang.String toString()
The String representation of a ValueComparer has the form "ValueComparer(child), where child is the String representation of the classifier whose value is being compared.

Overrides:
toString in class ValueComparer
Returns:
A string of the form described above.