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

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


        continue;
      }
      try
      {
        double d = Double.parseDouble(v.get(i));
        statVect.addValue(d);
      }
      catch (NumberFormatException e)
      {
        continue;
      }
View Full Code Here


    for (int i = 0, len = v.size(); (i < len); i++)
    {
      double d = v.get(i);
      try
      {
        statVect.addValue(d);
      }
      catch (NumberFormatException e)
      {
        continue;
      }
View Full Code Here

            }

            ChiSquareTestImpl cs = new ChiSquareTestImpl();
            try {
                pValues.addValue(cs.chiSquareTest(expected, observed));
                xs.addValue(cs.chiSquare(expected, observed));
            } catch (Exception e) {
                e.printStackTrace();
            }

        }
View Full Code Here

      for (int i1 = 0; i1 < hashRounds; i1++) {
        int[] hashes = hf.hash(data.get(i1), m, k);
      }
      long end_hash = System.nanoTime();

      speed.addValue((1.0 * end_hash - start_hash) / 1000000);
    }

    System.out.println("HashMethod : " + hm + ", " + " hashes = " + hashesPerRound + ", size = " + m + ", hashes = "
        + k + ", rounds = " + rounds);
    //System.out.println(speed);
View Full Code Here

   
    for(Long time : times) {
      DescriptiveStatistics stats = new DescriptiveStatistics();
      List<Long> list = bucketedRunTimes.get(time);
      for (Long l : list) {
        stats.addValue(l);
        runTimes.addValue(l);
      }
      bucketStats.put(time, stats);
     
      List<Long> waitList = bucketedWaitTimes.get(time);
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;
            while (System.currentTimeMillis() < runtimeEnd) {
                statistics.addValue(test.execute());
            }
        } finally {
            test.tearDown();
        }
View Full Code Here

      Thread.sleep(5000l);
    }

    DescriptiveStatistics withoutReplicaStats = new DescriptiveStatistics();
    for (TimingResult tr : resultsWithoutReplica) {
      withoutReplicaStats.addValue(tr.elapsedTime);
    }
    DescriptiveStatistics withReplicaStats = new DescriptiveStatistics();
    for (TimingResult tr : resultsWithReplica) {
      withReplicaStats.addValue(tr.elapsedTime);
    }
View Full Code Here

    for (TimingResult tr : resultsWithoutReplica) {
      withoutReplicaStats.addValue(tr.elapsedTime);
    }
    DescriptiveStatistics withReplicaStats = new DescriptiveStatistics();
    for (TimingResult tr : resultsWithReplica) {
      withReplicaStats.addValue(tr.elapsedTime);
    }

    LOG.info(Objects.toStringHelper("testName")
      .add("withoutReplicas", resultsWithoutReplica)
      .add("withReplicas", resultsWithReplica)
View Full Code Here

    Map<String, DescriptiveStatistics> results = new HashMap<String, DescriptiveStatistics>();
    for (RegionEnvironment env : coprocessors) {
      DescriptiveStatistics ds = new DescriptiveStatistics();
      if (env.getInstance() instanceof RegionObserver) {
        for (Long time : env.getExecutionLatenciesNanos()) {
          ds.addValue(time);
        }
        // Ensures that web ui circumvents the display of NaN values when there are zero samples.
        if (ds.getN() == 0) {
          ds.addValue(0);
        }
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.