Skip navigation links
keel.Algorithms.Rule_Learning.Slipper

Class Trio

    • Constructor Summary

      Constructors 
      Constructor and Description
      Trio()
      Default constructor.
      Trio(double clave)
      Constructs a Trio with the given value and 0 instaces for both positives and negatives.
      Trio(double clave, double value, int sign)
      Constructs a Trio with the given value and 0 instaces for both positives and negatives.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addNegative(double value)
      Increases the number of negative instances of a given dataset that contains the value.
      void addPositive(double value)
      Increases the number of positive instances of a given dataset that contains the value.
      double getKey()
      Returns the attribute's value.
      double getNegative()
      Returns the number of negative instances of a given dataset that contains the value.
      double getPositive()
      Returns the number of positive instances of a given dataset that contains the value.
      void setKey(double clave)
      Sets the attribute'value to a new value.
      java.lang.String toString()
      Returns a string that represent a Trio.
      java.lang.String toString(int i)
      Returns a string that represent a Trio, taking into account the given attribute's id.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Trio

        public Trio()
        Default constructor.
      • Trio

        public Trio(double clave)
        Constructs a Trio with the given value and 0 instaces for both positives and negatives.
        Parameters:
        clave - the attribute's value.
      • Trio

        public Trio(double clave,
                    double value,
                    int sign)
        Constructs a Trio with the given value and 0 instaces for both positives and negatives.
        Parameters:
        clave - the attribute's value.
        value - initial value
        sign - whether value goes to positives or to negatives
    • Method Detail

      • getKey

        public double getKey()
        Returns the attribute's value.
        Returns:
        the attribute's value.
      • getPositive

        public double getPositive()
        Returns the number of positive instances of a given dataset that contains the value.
        Returns:
        the number of positive instances.
      • getNegative

        public double getNegative()
        Returns the number of negative instances of a given dataset that contains the value.
        Returns:
        the number of negative instances.
      • setKey

        public void setKey(double clave)
        Sets the attribute'value to a new value.
        Parameters:
        clave - the new attribute's value.
      • addPositive

        public void addPositive(double value)
        Increases the number of positive instances of a given dataset that contains the value.
        Parameters:
        value - the adding value
      • addNegative

        public void addNegative(double value)
        Increases the number of negative instances of a given dataset that contains the value.
        Parameters:
        value - the adding value
      • toString

        public java.lang.String toString()
        Returns a string that represent a Trio.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string that represent a Trio.
      • toString

        public java.lang.String toString(int i)
        Returns a string that represent a Trio, taking into account the given attribute's id.
        Parameters:
        i - int the attribute's id.
        Returns:
        a string that represent a Trio.