Class LogNormalGenerator

Object
org.apache.spark.mllib.random.LogNormalGenerator
All Implemented Interfaces:
Serializable, RandomDataGenerator<Object>, Pseudorandom

public class LogNormalGenerator extends Object implements RandomDataGenerator<Object>
Generates i.i.d. samples from the log normal distribution with the given mean and standard deviation.

param: mean mean for the log normal distribution. param: std standard deviation for the log normal distribution

See Also:
  • Constructor Details

    • LogNormalGenerator

      public LogNormalGenerator(double mean, double std)
  • Method Details

    • copy

      public LogNormalGenerator copy()
      Description copied from interface: RandomDataGenerator
      Returns a copy of the RandomDataGenerator with a new instance of the rng object used in the class when applicable for non-locking concurrent usage.
      Specified by:
      copy in interface RandomDataGenerator<Object>
      Returns:
      (undocumented)
    • mean

      public double mean()
    • nextValue

      public double nextValue()
      Description copied from interface: RandomDataGenerator
      Returns an i.i.d. sample as a generic type from an underlying distribution.
      Specified by:
      nextValue in interface RandomDataGenerator<Object>
      Returns:
      (undocumented)
    • setSeed

      public void setSeed(long seed)
      Description copied from interface: Pseudorandom
      Set random seed.
      Specified by:
      setSeed in interface Pseudorandom
    • std

      public double std()