Package com.macrofocus.common.scale

# Class Probit

java.lang.Object
com.macrofocus.common.scale.Probit

public final class Probit extends Object
Provides a `probit(double)` method to convert from the (0.0,1.0) domain to a Gaussian range. Uses an algorithm by Peter John Acklam, as implemented by Sherali Karimov. Free to use, but you should credit Acklam and Karimov appropriately.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Probit()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static double`
  `probit(double d)`
  A way of taking a double in the (0.0, 1.0) range and mapping it to a Gaussian or normal distribution, so high inputs correspond to high outputs, and similarly for the low range.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Probit

    public Probit()

- ## Method Details

  - ### probit

    public static double probit(double d)
    A way of taking a double in the (0.0, 1.0) range and mapping it to a Gaussian or normal distribution, so high inputs correspond to high outputs, and similarly for the low range. This is centered on 0.0 and its standard deviation seems to be 1.0 (the same as Random#nextGaussian()). It is slightly faster (about a 10% increase in throughput, with comparable overhead for both methods) than the approach used by Random#nextGaussian(), even when both use a faster RNG algorithm and when both values produced by nextGaussian() are used.
    This uses an algorithm by Peter John Acklam, as implemented by Sherali Karimov. Source. Information on the algorithm.
    Parameters:
      `d` - should be between 0 and 1, exclusive, but other values are tolerated (they return infinite results)
    Returns:
      a normal-distributed double centered on 0.0