public class MultiValueComparer extends ValueComparer
ValueComparer
because it does not
assume that the given classifier will return only a single feature.labeler, value
containingPackage, name
Constructor and Description |
---|
MultiValueComparer(Classifier c,
String v)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
FeatureVector |
classify(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 . |
String |
discreteValue(Object o)
Returns the value of the discrete feature that would be returned by this classifier.
|
Feature |
featureValue(Object o)
Returns the classification of the given example object as a single feature instead of a
FeatureVector . |
short |
shortValue(Object o)
Returns the prediction of this classifier as a
short that acts as a pointer into
DiscreteFeature.BooleanValues . |
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. |
allowableValues, getInputType, setLabeler
classify, clone, discreteValueArray, getCompositeChildren, getOutputType, realValue, realValueArray, test, valueIndexOf
public MultiValueComparer(Classifier c, String v)
c
- The classifier whose value will be compared.v
- The value to compare with.public FeatureVector classify(Object o)
ValueComparer.labeler
applied to the argument object contained the feature value
referenced by ValueComparer.value
.classify
in class ValueComparer
o
- The object to make decisions about.public Feature featureValue(Object o)
FeatureVector
.featureValue
in class ValueComparer
o
- The object to classify.o
as a feature.public String discreteValue(Object o)
discreteValue
in class ValueComparer
o
- The object to classify.public short shortValue(Object o)
short
that acts as a pointer into
DiscreteFeature.BooleanValues
.o
- The object to classify.o
as a short
.public String toString()
String
representation of a ValueComparer
has the form
"ValueComparer(
child)
, where child is the
String
representation of the classifier whose value is being compared.toString
in class ValueComparer
Copyright © 2016. All rights reserved.