public class ValueComparer extends Classifier
discrete
.MultiValueComparer
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Classifier |
labeler
The classifier whose value will be compared.
|
protected String |
value
The value to compare with.
|
containingPackage, name
Constructor and Description |
---|
ValueComparer(Classifier c,
String v)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String[] |
allowableValues()
Returns the array of allowable values that a feature returned by this classifier may take.
|
FeatureVector |
classify(Object o)
|
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 . |
String |
getInputType()
Returns a string describing the input type of this classifier.
|
void |
setLabeler(Classifier l)
Sets the value of
labeler . |
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. |
classify, clone, discreteValueArray, getCompositeChildren, getOutputType, realValue, realValueArray, test, valueIndexOf
protected Classifier labeler
protected String value
public ValueComparer(Classifier c, String v)
c
- The classifier whose value will be compared.v
- The value to compare with.public void setLabeler(Classifier l)
labeler
.public FeatureVector classify(Object o)
labeler
applied to the argument object and value
.classify
in class Classifier
o
- The object to make decisions about.public Feature featureValue(Object o)
FeatureVector
.featureValue
in class Classifier
o
- The object to classify.o
as a feature.public String discreteValue(Object o)
discreteValue
in class Classifier
o
- The object to classify.public String getInputType()
getInputType
in class Classifier
public String[] allowableValues()
allowableValues
in class Classifier
DiscreteFeature.BooleanValues
DiscreteFeature.BooleanValues
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 Classifier
Copyright © 2016. All rights reserved.