Examples of NormalDistribution


Examples of com.enterprisemath.math.probability.NormalDistribution

            }
            // split the component with highest weight
            NormalDistributionMixture.Builder builder = new NormalDistributionMixture.Builder();
            for (int i = 0; i < res.getNumComponents(); ++i) {
                if (i == splitIdx) {
                    NormalDistribution comp = res.getComponents().get(i);
                    builder.addComponent(res.getWeights().get(i) / 2, comp.getMi() + comp.getSigma() / 2, comp.getSigma());
                    builder.addComponent(res.getWeights().get(i) / 2, comp.getMi() - comp.getSigma() / 2, comp.getSigma());
                }
                else {
                    if (res.getWeights().get(i) >= minWeight) {
                        builder.addComponent(res.getWeights().get(i), res.getComponents().get(i));
                    }
View Full Code Here

Examples of com.mockturtlesolutions.snifflib.stats.NormalDistribution

//     }


    System.out.println("NICKNAME!!!!!!!!!!!!!!!!="+this.bufferData.getNickname());
   
    this.normal = new NormalDistribution();
    this.rhsSolution = null;
   
    this.repository = repos;
    this.connection = conn;
    this.dataSetStartRow = 0;
View Full Code Here

Examples of com.opengamma.analytics.math.statistics.distribution.NormalDistribution

  @Override
  public ProbabilityDistribution<Double> evaluate(final double[] x) {
    Validate.notNull(x, "x");
    ArgumentChecker.notEmpty(x, "x");
    return new NormalDistribution(_mean.evaluate(x), _std.evaluate(x));
  }
View Full Code Here

Examples of com.tinkerpop.furnace.generators.NormalDistribution

        int numNodes = 100;
        int numEdges = 1000;
        long seed = System.currentTimeMillis();
        Random random = new Random(seed);
        //normal
        Distribution n = new NormalDistribution(2);
        n = n.initialize(numNodes,numEdges);
        int degreeSum = 0;
        for (int i=0;i<numNodes;i++) {
            int degree=n.nextValue(random);
            degreeSum+=degree;
        }
        System.out.println(degreeSum);

        random = new Random(seed);
        n = new NormalDistribution(2);
        n = n.initialize(numNodes,numEdges);
        for (int i=0;i<numNodes;i++) {
            degreeSum-=n.nextValue(random);
        }
        assertEquals(0,degreeSum);

        //scale free
        n = new PowerLawDistribution(2.9);
        n = n.initialize(numNodes,numEdges);
        degreeSum = 0;
        for (int i=0;i<numNodes;i++) {
            int degree=n.nextValue(random);
            //System.out.println(degree);
            degreeSum+=degree;
        }
        System.out.println(degreeSum);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.synthetic.bymodel.distribution.NormalDistribution

      stddev = Double.valueOf(stddevstr);
    }

    // *** New normal distribution generator
    Random random = cluster.getNewRandomGenerator();
    Distribution generator = new NormalDistribution(mean, stddev, random);
    cluster.addGenerator(generator);

    // TODO: check for unknown attributes.
    for(Node child : new XMLNodeIterator(cur.getFirstChild())) {
      if(child.getNodeType() == Node.ELEMENT_NODE) {
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.statistics.distribution.NormalDistribution

      stddev = Double.parseDouble(stddevstr);
    }

    // *** New normal distribution generator
    Random random = cluster.getNewRandomGenerator();
    Distribution generator = new NormalDistribution(mean, stddev, random);
    cluster.addGenerator(generator);

    // TODO: check for unknown attributes.
    for(Node child : new XMLNodeIterator(cur.getFirstChild())) {
      if(child.getNodeType() == Node.ELEMENT_NODE) {
View Full Code Here

Examples of fork.lib.math.algebra.elementary.function.v1.distr.NormalDistribution

        Iterator<Double> it= cs.keySet().iterator();
        while(it.hasNext()){
            Double v= it.next();
            Integer f= cs.get(v);
            double coeff= (double) f.intValue()/size();
            fn= fn.add( (new NormalDistribution( v.doubleValue(), sigma)).
                    multiply(new ConstantFunction(coeff)) );
        }
        return fn;
    }catch(FunctionException e){
        e.printStackTrace();
View Full Code Here

Examples of org.apache.commons.math3.distribution.NormalDistribution

    public ConfidenceInterval createInterval(int numberOfTrials, int numberOfSuccesses,
                                             double confidenceLevel) {
        IntervalUtils.checkParameters(numberOfTrials, numberOfSuccesses, confidenceLevel);
        final double mean = (double) numberOfSuccesses / (double) numberOfTrials;
        final double alpha = (1.0 - confidenceLevel) / 2;
        final NormalDistribution normalDistribution = new NormalDistribution();
        final double difference = normalDistribution.inverseCumulativeProbability(1 - alpha) *
                                  FastMath.sqrt(1.0 / numberOfTrials * mean * (1 - mean));
        return new ConfidenceInterval(mean - difference, mean + difference, confidenceLevel);
    }
View Full Code Here

Examples of org.apache.commons.math3.distribution.NormalDistribution

    /** {@inheritDoc} */
    public ConfidenceInterval createInterval(int numberOfTrials, int numberOfSuccesses, double confidenceLevel) {
        IntervalUtils.checkParameters(numberOfTrials, numberOfSuccesses, confidenceLevel);
        final double alpha = (1.0 - confidenceLevel) / 2;
        final NormalDistribution normalDistribution = new NormalDistribution();
        final double z = normalDistribution.inverseCumulativeProbability(1 - alpha);
        final double zSquared = FastMath.pow(z, 2);
        final double mean = (double) numberOfSuccesses / (double) numberOfTrials;

        final double factor = 1.0 / (1 + (1.0 / numberOfTrials) * zSquared);
        final double modifiedSuccessRatio = mean + (1.0 / (2 * numberOfTrials)) * zSquared;
 
View Full Code Here

Examples of org.apache.commons.math3.distribution.NormalDistribution

    /** {@inheritDoc} */
    public ConfidenceInterval createInterval(int numberOfTrials, int numberOfSuccesses, double confidenceLevel) {
        IntervalUtils.checkParameters(numberOfTrials, numberOfSuccesses, confidenceLevel);
        final double alpha = (1.0 - confidenceLevel) / 2;
        final NormalDistribution normalDistribution = new NormalDistribution();
        final double z = normalDistribution.inverseCumulativeProbability(1 - alpha);
        final double zSquared = FastMath.pow(z, 2);
        final double modifiedNumberOfTrials = numberOfTrials + zSquared;
        final double modifiedSuccessesRatio = (1.0 / modifiedNumberOfTrials) * (numberOfSuccesses + 0.5 * zSquared);
        final double difference = z *
                                  FastMath.sqrt(1.0 / modifiedNumberOfTrials * modifiedSuccessesRatio *
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.