Class Classifier

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 Details

    • DEFAULT_FIELD_NAME

      public static final String DEFAULT_FIELD_NAME
      The default name of the field generated by a classifier.
      See Also:
    • PROP_WEIGHTS

      public static final String PROP_WEIGHTS
      Name of the property utilized by the weighted average classifier.
      See Also:
  • Constructor Details

    • 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 wanted
      fieldNames - input field names of the classifier
      outputFieldName - 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 wanted
      fieldNames - input field names of the classifier
      outputFieldName - name of the output field containing the score
      properties - properties specific to the classifier type
  • Method Details

    • 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 name
      value - 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