Package org.apache.commons.math.stat.descriptive

Examples of org.apache.commons.math.stat.descriptive.DescriptiveStatistics.addValue()


      super.testTakedown();
      if (opts.reportLatency) {
        Arrays.sort(times);
        DescriptiveStatistics ds = new DescriptiveStatistics();
        for (double t : times) {
          ds.addValue(t);
        }
        LOG.info("randomRead latency log (ms), on " + times.length + " measures");
        LOG.info("99.9999% = " + ds.getPercentile(99.9999d));
        LOG.info(" 99.999% = " + ds.getPercentile(99.999d));
        LOG.info("  99.99% = " + ds.getPercentile(99.99d));
View Full Code Here


        line = in.readLine();

        while (line != null) {
            if (d != null) {
                d.addValue(Double.parseDouble(line.trim()));
            else {
                s.addValue(Double.parseDouble(line.trim()));
            }
            line = in.readLine();
        }
View Full Code Here

            }

            // Run test iterations, and capture the execution times
            long runtimeEnd = System.currentTimeMillis() + runtime * 1000;
            while (System.currentTimeMillis() < runtimeEnd) {
                statistics.addValue(test.execute());
            }
        } finally {
            test.tearDown();
        }

View Full Code Here

            }

            // Run test iterations, and capture the execution times
            long runtimeEnd = System.currentTimeMillis() + RUNTIME;
            while (System.currentTimeMillis() < runtimeEnd) {
                statistics.addValue(execute());
            }
        } finally {
            tearDown();
        }
View Full Code Here

    averageScores = new HashMap<String,Double>();
    maxScores = new HashMap<String,Double>();
    for(String surf : scoresForEntity.keySet()) {
      DescriptiveStatistics descStats = new DescriptiveStatisticsImpl();
      for(double score : scoresForEntity.get(surf)) {
        descStats.addValue(score);
      }
      maxScores.put(surf, descStats.getMax());
      averageScores.put(surf, descStats.getMean());
    }
   
View Full Code Here

    public static double[] normalize(final double[] sample) {
        DescriptiveStatistics stats = new DescriptiveStatistics();

        // Add the data from the series to stats
        for (int i = 0; i < sample.length; i++) {
            stats.addValue(sample[i]);
        }

        // Compute mean and standard deviation
        double mean = stats.getMean();
        double standardDeviation = stats.getStandardDeviation();
View Full Code Here

        this.chartNames.add(chartName);
       
        DescriptiveStatistics  stat = new DescriptiveStatistics();
       
        for (RobEA rob : env.getAgents()) {
            stat.addValue(rob.getFitSum());
        }
       
        ChartEvent event1 = new ChartEvent(chartName, columns[0], stat.getMean());
        ChartEvent event2 = new ChartEvent(chartName, columns[1], stat.getMean() + stat.getStandardDeviation());
        ChartEvent event3 = new ChartEvent(chartName, columns[2], stat.getMean() - stat.getStandardDeviation());
View Full Code Here

                // Durchschnitt berechnen.
                for (double d : werte) {
                    sum += d;
                }
               
                stat.addValue(1 / (sum / werte.size()));
            }

            ChartEvent event1 = new ChartEvent(chartName, columns[0], stat.getMean());
            ChartEvent event2 = new ChartEvent(chartName, columns[1], stat.getMean() + stat.getStandardDeviation());
            ChartEvent event3 = new ChartEvent(chartName, columns[2], stat.getMean() - stat.getStandardDeviation());
View Full Code Here

            long runtimeEnd =
                    System.currentTimeMillis()
                    + TimeUnit.MILLISECONDS.convert(1, TimeUnit.MINUTES);
            while (iterations++ < 10
                    || System.currentTimeMillis() < runtimeEnd) {
                statistics.addValue(execute());
            }
        } finally {
            tearDown();
        }
View Full Code Here

      super.testTakedown();
      if (opts.reportLatency) {
        Arrays.sort(times);
        DescriptiveStatistics ds = new DescriptiveStatistics();
        for (double t : times) {
          ds.addValue(t);
        }
        LOG.info("randomRead latency log (ms), on " + times.length + " measures");
        LOG.info("99.9999% = " + ds.getPercentile(99.9999d));
        LOG.info(" 99.999% = " + ds.getPercentile(99.999d));
        LOG.info("  99.99% = " + ds.getPercentile(99.99d));
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.