Documentation of 'org.nd4j.linalg.sampling.Sampling' Java class
Sampling
org.nd4j.linalg.sampling

Class Sampling



  • public class Sampling
    extends java.lang.Object
    Static methods for sampling from an ndarray
    • Constructor Detail

      • Sampling

        public Sampling()
    • Method Detail

      • normal

        public static INDArray normal(RandomGenerator rng,
                                      INDArray mean,
                                      INDArray sigma)
        A uniform sample ranging from 0 to sigma.
        Parameters:
        rng - the rng to use
        mean, - the matrix mean from which to generate values from
        sigma - the standard deviation to use to generate the gaussian noise
        Returns:
        a uniform sample of the given shape and size

        with numbers between 0 and 1

      • normal

        public static INDArray normal(RandomGenerator rng,
                                      INDArray mean,
                                      double sigma)
        A uniform sample ranging from 0 to sigma.
        Parameters:
        rng - the rng to use
        mean, - the matrix mean from which to generate values from
        sigma - the standard deviation to use to generate the gaussian noise
        Returns:
        a uniform sample of the given shape and size

        with numbers between 0 and 1

      • binomial

        public static INDArray binomial(INDArray p,
                                        int n,
                                        RandomGenerator rng)
        Generate a binomial distribution based on the given rng, a matrix of p values, and a max number.
        Parameters:
        p - the p matrix to use
        n - the n to use
        rng - the rng to use
        Returns:
        a binomial distribution based on the one n, the passed in p values, and rng

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.