Class STTaper


  • public final class STTaper
    extends SubsetTrainConfig
    Specifies the use of a random tapering function to generate some examples for subsets. Immutable class. Examples for subsets that have fewer feature values removed from the original feature vector are generated more often. Due to the randomness of the subset generation, the model training process cannot be repeated exactly.

    Default values: positive and negative tapers 0.5.

    • Constructor Summary

      Constructors 
      Constructor Description
      STTaper()
      Creates a new subset training configuration that uses a tapering function with default parameters.
      STTaper​(double positiveTaper, double negativeTaper)
      Creates a new subset training configuration that uses a tapering function with custom parameters.
    • Constructor Detail

      • STTaper

        public STTaper()
        Creates a new subset training configuration that uses a tapering function with default parameters.
      • STTaper

        public STTaper​(double positiveTaper,
                       double negativeTaper)
        Creates a new subset training configuration that uses a tapering function with custom parameters. Larger taper values result in fewer generated examples.
        Parameters:
        positiveTaper - - steepness of tapering function for examples with True labels.
        negativeTaper - - steepness of tapering function for examples with False labels.
        Throws:
        java.lang.IllegalArgumentException - if any taper value is not between 0 and 1.
    • Method Detail

      • copy

        public STTaper copy()
        Description copied from class: SubsetTrainConfig
        Copies this object to a new object. Assumes that some subclasses may be mutable.
        Specified by:
        copy in class SubsetTrainConfig
        Returns:
        a deep copy of this object. An object of appropriate subclass is returned.
      • getPositive

        public double getPositive()
        Returns:
        positive taper value stored in this object.
      • getNegative

        public double getNegative()
        Returns:
        negative taper value stored in this object.