Class LinearScalingTransformation

java.lang.Object
org.tribuo.transform.transformations.LinearScalingTransformation
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<TransformationProvenance>, Transformation

public final class LinearScalingTransformation extends Object implements Transformation
A Transformation which takes an observed distribution and rescales it so all values are between the desired min and max. The scaling is linear.

Values outside the observed range are clamped to the desired min or max.

  • Constructor Details

    • LinearScalingTransformation

      public LinearScalingTransformation()
      Defaults to zero - one.
    • LinearScalingTransformation

      public LinearScalingTransformation(double targetMin, double targetMax)
      Constructs a LinearScalingTransformation which puts feature values into the specified range.
      Parameters:
      targetMin - The new minimum feature value.
      targetMax - The new maximum feature value.
  • Method Details

    • postConfig

      public void postConfig()
      Used by the OLCUT configuration system, and should not be called by external code.
      Specified by:
      postConfig in interface com.oracle.labs.mlrg.olcut.config.Configurable
    • createStats

      public TransformStatistics createStats()
      Description copied from interface: Transformation
      Creates the statistics object for this Transformation.
      Specified by:
      createStats in interface Transformation
      Returns:
      The statistics object.
    • getProvenance

      public TransformationProvenance getProvenance()
      Specified by:
      getProvenance in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<TransformationProvenance>
    • toString

      public String toString()
      Overrides:
      toString in class Object