Search in sources :

Example 16 with RandomEngine

use of cern.jet.random.engine.RandomEngine in project processdash by dtuma.

the class LognormalConfidenceInterval method generateBootstrapSamples.

private double[] generateBootstrapSamples() {
    RandomEngine u = new MersenneTwister();
    Normal normal = new Normal(0, 1, u);
    ChiSquare chisquare = new ChiSquare(numSamples - 1, u);
    int bootstrapSize = Settings.getInt("logCI.bootstrapSize", 2000);
    double[] samples = new double[bootstrapSize];
    for (int i = bootstrapSize; i-- > 0; ) samples[i] = generateBootstrapSample(normal, chisquare, numSamples, logstd);
    Arrays.sort(samples);
    return samples;
}
Also used : ChiSquare(cern.jet.random.ChiSquare) RandomEngine(cern.jet.random.engine.RandomEngine) MersenneTwister(cern.jet.random.engine.MersenneTwister) Normal(cern.jet.random.Normal)

Aggregations

RandomEngine (cern.jet.random.engine.RandomEngine)16 Normal (cern.jet.random.Normal)8 MersenneTwister64 (cern.jet.random.engine.MersenneTwister64)7 MeterRegistry (io.micrometer.core.instrument.MeterRegistry)6 SampleConfig (io.micrometer.core.samples.utils.SampleConfig)6 Duration (java.time.Duration)6 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)6 Test (org.junit.Test)6 Flux (reactor.core.publisher.Flux)6 Timer (io.micrometer.core.instrument.Timer)4 TimeUnit (java.util.concurrent.TimeUnit)4 MersenneTwister (cern.jet.random.engine.MersenneTwister)2 FunctionTimer (io.micrometer.core.instrument.FunctionTimer)2 ChiSquare (cern.jet.random.ChiSquare)1 Counter (io.micrometer.core.instrument.Counter)1 LongTaskTimer (io.micrometer.core.instrument.LongTaskTimer)1 Tags (io.micrometer.core.instrument.Tags)1 TimeUtils (io.micrometer.core.instrument.util.TimeUtils)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1