Java Code Examples for org.apache.commons.math3.exception.util.LocalizedFormats#STANDARD_DEVIATION
The following examples show how to use
org.apache.commons.math3.exception.util.LocalizedFormats#STANDARD_DEVIATION .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NormalDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public NormalDistribution(RandomGenerator rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; logStandardDeviationPlusHalfLog2Pi = FastMath.log(sd) + 0.5 * FastMath.log(2 * FastMath.PI); solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 2
Source File: NormalDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public NormalDistribution(RandomGenerator rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 3
Source File: NormalDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public NormalDistribution(RandomGenerator rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 4
Source File: NormalDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public NormalDistribution(RandomGenerator rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 5
Source File: NormalDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public NormalDistribution(RandomGenerator rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; logStandardDeviationPlusHalfLog2Pi = FastMath.log(sd) + 0.5 * FastMath.log(2 * FastMath.PI); solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 6
Source File: NormalDistribution.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public NormalDistribution(RandomGenerator rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 7
Source File: RandomDataImpl.java From astor with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ public double nextGaussian(double mu, double sigma) { if (sigma <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sigma); } return sigma * getRan().nextGaussian() + mu; }
Example 8
Source File: Cardumen_00165_t.java From coming with MIT License | 5 votes |
/** * Create a normal distribution using the given mean, standard deviation and * inverse cumulative distribution accuracy. * * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 2.1 */ public NormalDistribution(double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 9
Source File: NormalDistribution.java From deeplearning4j with Apache License 2.0 | 5 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public NormalDistribution(Random rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 10
Source File: RandomDataImpl.java From astor with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ public double nextGaussian(double mu, double sigma) { if (sigma <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sigma); } return sigma * getRan().nextGaussian() + mu; }
Example 11
Source File: TruncatedNormalDistribution.java From nd4j with Apache License 2.0 | 5 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public TruncatedNormalDistribution(Random rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 12
Source File: TruncatedNormalDistribution.java From deeplearning4j with Apache License 2.0 | 5 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public TruncatedNormalDistribution(Random rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 13
Source File: RandomDataGenerator.java From astor with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ public double nextGaussian(double mu, double sigma) throws NotStrictlyPositiveException { if (sigma <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sigma); } return sigma * getRandomGenerator().nextGaussian() + mu; }
Example 14
Source File: Cardumen_00259_s.java From coming with MIT License | 5 votes |
/** * Create a normal distribution using the given mean, standard deviation and * inverse cumulative distribution accuracy. * * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 2.1 */ public NormalDistribution(double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 15
Source File: RandomDataGenerator.java From astor with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ public double nextGaussian(double mu, double sigma) throws NotStrictlyPositiveException { if (sigma <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sigma); } return sigma * getRandomGenerator().nextGaussian() + mu; }
Example 16
Source File: Cardumen_00109_t.java From coming with MIT License | 5 votes |
/** * Create a normal distribution using the given mean, standard deviation and * inverse cumulative distribution accuracy. * * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 2.1 */ public NormalDistribution(double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 17
Source File: NormalDistribution.java From nd4j with Apache License 2.0 | 5 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public NormalDistribution(Random rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 18
Source File: Cardumen_0039_s.java From coming with MIT License | 5 votes |
/** * Create a normal distribution using the given mean, standard deviation and * inverse cumulative distribution accuracy. * * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 2.1 */ public NormalDistribution(double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 19
Source File: Cardumen_0039_t.java From coming with MIT License | 5 votes |
/** * Create a normal distribution using the given mean, standard deviation and * inverse cumulative distribution accuracy. * * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 2.1 */ public NormalDistribution(double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }
Example 20
Source File: LogNormalDistribution.java From deeplearning4j with Apache License 2.0 | 5 votes |
/** * Creates a normal distribution. * * @param rng Random number generator. * @param mean Mean for this distribution. * @param sd Standard deviation for this distribution. * @param inverseCumAccuracy Inverse cumulative probability accuracy. * @throws NotStrictlyPositiveException if {@code sd <= 0}. * @since 3.1 */ public LogNormalDistribution(Random rng, double mean, double sd, double inverseCumAccuracy) throws NotStrictlyPositiveException { super(rng); if (sd <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, sd); } this.mean = mean; standardDeviation = sd; solverAbsoluteAccuracy = inverseCumAccuracy; }