Class InputTargetPair

java.lang.Object
com.pervasive.datarush.analytics.naivebayes.InputTargetPair
All Implemented Interfaces:
Comparable<InputTargetPair>

public final class InputTargetPair extends Object implements Comparable<InputTargetPair>
Represents the pair (inputValue, targetValue). Used in the context of a PMML "PairCounts" element, the inputValue corresponds to the "value" attribute and the targetValue corresponds to the "value" attribute of the "TargetStatistics" child-element.
  • Constructor Details

    • InputTargetPair

      public InputTargetPair(String inputValue, String targetValue)
      Create a new InputTargetPair.
      Parameters:
      inputValue - the input value.
      targetValue - the target value.
  • Method Details

    • equals

      public boolean equals(Object o)
      Two InputTargetPair's are equal if their input values and target values are equal.
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare to.
      Returns:
      true if this is equal to o
    • hashCode

      public int hashCode()
      Returns a hashCode based on input value and target value.
      Overrides:
      hashCode in class Object
      Returns:
      a hashCode based on input value and target value.
    • toString

      public String toString()
      Returns a string representation of this object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this object.
    • getInputValue

      public String getInputValue()
      Returns the input value of this pair.
      Returns:
      the input value of this pair.
    • getTargetValue

      public String getTargetValue()
      Returns the target value of this pair.
      Returns:
      the target value of this pair.
    • compareTo

      public int compareTo(InputTargetPair o)
      Compare this to another InputTargetPair. Sorted first by input value, then by target value.
      Specified by:
      compareTo in interface Comparable<InputTargetPair>