Examples of PDF()


Examples of cern.jet.random.Normal.pdf()

        final Normal n = new Normal(0.0, 1.0, null);
        for( final double mu : new double[]{-5.0, -3.2, -1.5, 0.0, 1.2, 3.0, 5.8977} ) {
            for( final double sigma : new double[]{1.2, 3.0, 5.8977} ) {
                for( final double x : new double[]{-5.0, -3.2, -1.5, 0.0, 1.2, 3.0, 5.8977} ) {
                    n.setState(mu, sigma);
                    Assert.assertEquals(n.pdf(x), MathUtils.normalDistribution(mu, sigma, x), requiredPrecision);
                    Assert.assertEquals(Math.log10(n.pdf(x)), MathUtils.normalDistributionLog10(mu, sigma, x), requiredPrecision);
                }
            }
        }
    }
View Full Code Here

Examples of cern.jet.random.Normal.pdf()

        for( final double mu : new double[]{-5.0, -3.2, -1.5, 0.0, 1.2, 3.0, 5.8977} ) {
            for( final double sigma : new double[]{1.2, 3.0, 5.8977} ) {
                for( final double x : new double[]{-5.0, -3.2, -1.5, 0.0, 1.2, 3.0, 5.8977} ) {
                    n.setState(mu, sigma);
                    Assert.assertEquals(n.pdf(x), MathUtils.normalDistribution(mu, sigma, x), requiredPrecision);
                    Assert.assertEquals(Math.log10(n.pdf(x)), MathUtils.normalDistributionLog10(mu, sigma, x), requiredPrecision);
                }
            }
        }
    }
View Full Code Here

Examples of com.aamend.hadoop.clustering.cluster.Cluster.pdf()

        // Get distance from that point to any cluster center
        double[] pdf = new double[clusters.size()];
        for (int i = 0; i < clusters.size(); i++) {
            Cluster cluster = clusters.get(i);
            pdf[i] = cluster.pdf((int[]) value.get(), measure);
        }

        // Get the cluster with smallest distance to that point
        double maxSimilarity = pdf[0];
        int maxSimilarityId = 0;
View Full Code Here

Examples of com.facebook.LinkBench.distributions.GeometricDistribution.pdf()

    assertEquals(0.657, d.cdf(3), 0.001);
    assertEquals(0.917646, d.cdf(7), 0.001);
    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
    assertEquals(0.147, d.pdf(3), 0.001);
    assertEquals(0.035, d.pdf(7), 0.001);
    assertEquals(0.012106, d.pdf(10), 0.001);
    assertEquals(0.002035, d.pdf(15), 0.001);
View Full Code Here

Examples of com.facebook.LinkBench.distributions.GeometricDistribution.pdf()

    assertEquals(0.917646, d.cdf(7), 0.001);
    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
    assertEquals(0.147, d.pdf(3), 0.001);
    assertEquals(0.035, d.pdf(7), 0.001);
    assertEquals(0.012106, d.pdf(10), 0.001);
    assertEquals(0.002035, d.pdf(15), 0.001);
  }
View Full Code Here

Examples of com.facebook.LinkBench.distributions.GeometricDistribution.pdf()

    assertEquals(0.971752, d.cdf(10), 0.001);
    assertEquals(0.995252, d.cdf(15), 0.001);

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
    assertEquals(0.147, d.pdf(3), 0.001);
    assertEquals(0.035, d.pdf(7), 0.001);
    assertEquals(0.012106, d.pdf(10), 0.001);
    assertEquals(0.002035, d.pdf(15), 0.001);
  }
}
View Full Code Here

Examples of com.facebook.LinkBench.distributions.GeometricDistribution.pdf()

    assertEquals(0.995252, d.cdf(15), 0.001);

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
    assertEquals(0.147, d.pdf(3), 0.001);
    assertEquals(0.035, d.pdf(7), 0.001);
    assertEquals(0.012106, d.pdf(10), 0.001);
    assertEquals(0.002035, d.pdf(15), 0.001);
  }
}
View Full Code Here

Examples of com.facebook.LinkBench.distributions.GeometricDistribution.pdf()

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
    assertEquals(0.147, d.pdf(3), 0.001);
    assertEquals(0.035, d.pdf(7), 0.001);
    assertEquals(0.012106, d.pdf(10), 0.001);
    assertEquals(0.002035, d.pdf(15), 0.001);
  }
}
View Full Code Here

Examples of com.facebook.LinkBench.distributions.GeometricDistribution.pdf()

    assertEquals(0.3, d.pdf(1), 0.001);
    assertEquals(0.21, d.pdf(2), 0.001);
    assertEquals(0.147, d.pdf(3), 0.001);
    assertEquals(0.035, d.pdf(7), 0.001);
    assertEquals(0.012106, d.pdf(10), 0.001);
    assertEquals(0.002035, d.pdf(15), 0.001);
  }
}
View Full Code Here

Examples of com.facebook.LinkBench.distributions.ProbabilityDistribution.pdf()

  public void testPDFSanity() {
    ProbabilityDistribution dist = getDist();
    long min = 453, max = 26546454;
    dist.init(min, max, getDistParams(), "");

    assertEquals(0.0, dist.pdf(min-1));
    assertEquals(0.0, dist.pdf(min-234321));
    assertEquals(0.0, dist.pdf(max));
    assertEquals(0.0, dist.pdf(max+2343242224234L));

    // Check pdf is in correct range
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.