- java.lang.Object
-
- com.pervasive.datarush.matching.Classifier
-
public class Classifier extends Object
Describes which classification methodology to use. Classification takes multiple comparison results and generates a single value that summarizes the strength of the field comparisons.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_FIELD_NAMEThe default name of the field generated by a classifier.static StringPROP_WEIGHTSName of the property utilized by the weighted average classifier.
-
Constructor Summary
Constructors Constructor Description Classifier()Construct an empty classifier.Classifier(ClassifierType type, String[] fieldNames, String outputFieldName)Construct a classifier without any specific properties.Classifier(ClassifierType type, String[] fieldNames, String outputFieldName, Map<String,Object> properties)Construct a classifier with properties specific to the classifier type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getFields()Get the input field names.StringgetOutput()Get the output field name.Map<String,Object>getProperties()Get the classifier type specific properties.ClassifierTypegetType()Get the classifier type.voidsetFields(String[] fieldNames)Set the input field names.voidsetOutput(String outputFieldName)Set the output field name.voidsetProperties(Map<String,Object> properties)Set the classifier type specific properties.voidsetProperty(String name, Object value)Set a type specific property.voidsetType(ClassifierType type)Set the classifier type.
-
-
-
Field Detail
-
DEFAULT_FIELD_NAME
public static final String DEFAULT_FIELD_NAME
The default name of the field generated by a classifier.- See Also:
- Constant Field Values
-
PROP_WEIGHTS
public static final String PROP_WEIGHTS
Name of the property utilized by the weighted average classifier.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Classifier
public Classifier()
Construct an empty classifier.
-
Classifier
public Classifier(ClassifierType type, String[] fieldNames, String outputFieldName)
Construct a classifier without any specific properties.- Parameters:
type- the type of classifier wantedfieldNames- input field names of the classifieroutputFieldName- name of the output field containing the score
-
Classifier
public Classifier(ClassifierType type, String[] fieldNames, String outputFieldName, Map<String,Object> properties)
Construct a classifier with properties specific to the classifier type.- Parameters:
type- the type of classifier wantedfieldNames- input field names of the classifieroutputFieldName- name of the output field containing the scoreproperties- properties specific to the classifier type
-
-
Method Detail
-
getType
public ClassifierType getType()
Get the classifier type.- Returns:
- classifier type
-
setType
public void setType(ClassifierType type)
Set the classifier type.- Parameters:
type- the classifier type
-
getProperties
public Map<String,Object> getProperties()
Get the classifier type specific properties.- Returns:
- classifier type specific properties
-
setProperties
public void setProperties(Map<String,Object> properties)
Set the classifier type specific properties. This sets the current properties, overriding all other settings.- Parameters:
properties- the classifier type specific properties
-
setProperty
public void setProperty(String name, Object value)
Set a type specific property.- Parameters:
name- property namevalue- property value
-
getFields
public String[] getFields()
Get the input field names.- Returns:
- input field names
-
setFields
public void setFields(String[] fieldNames)
Set the input field names.- Parameters:
fieldNames- input field names
-
getOutput
public String getOutput()
Get the output field name.- Returns:
- output field names
-
setOutput
public void setOutput(String outputFieldName)
Set the output field name.- Parameters:
outputFieldName- output field names
-
-