Class MeanStdDevTransformation

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

public final class MeanStdDevTransformation extends Object implements Transformation
A Transformation which takes an observed distribution and rescales it so it has the desired mean and standard deviation.

Checks to see that the requested standard deviation is positive, throws IllegalArgumentException otherwise.

  • Constructor Details

    • MeanStdDevTransformation

      public MeanStdDevTransformation()
      Defaults to zero mean, one std dev.
    • MeanStdDevTransformation

      public MeanStdDevTransformation(double targetMean, double targetStdDev)
      Constructs a MeanStdDevTransformation targetting the specified mean and standard deviation.
      Parameters:
      targetMean - The target mean.
      targetStdDev - The target standard deviation.
  • 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