Package org.apache.commons.math3.stat.descriptive.moment

Examples of org.apache.commons.math3.stat.descriptive.moment.StandardDeviation


  @Test
  public void dynamismTest2() {

    final double[] ordersPerHour = { 15d };// , 20d, 50d, 100d, 1000d };

    final StandardDeviation sd = new StandardDeviation();

    final RandomGenerator rng = new MersenneTwister(123L);

    final List<Times> times = newArrayList();
    // for (int i = 0; i < 10; i++) {
View Full Code Here


          finalIntensity);

      double max = 0;
      double sum = 0;

      final StandardDeviation sd = new StandardDeviation();
      final List<Double> dynamismValues = newArrayList();
      for (int j = 0; j < numSamples; j++) {
        final List<Double> times = generator.generate(rng);

        final double dyn = Metrics.measureDynamism(times, lengthOfScenario);
        dynamismValues.add(dyn);
        sd.increment(dyn);
        sum += dyn;
        max = Math.max(max, dyn);
        if (j < 3) {
          // System.out.printf("%1.3f%% %d%n", dyn * 100, times.size());
          Analysis.writeTimes(
              lengthOfScenario,
              times,
              new File(
                  "files/test/times/orders"
                      + Strings.padStart(Integer.toString(i), 2, '0') + "_" + j
                      + "-" + (dyn * 100)
                      + ".times"));
        }
      }

      try {
        writer.append(Double.toString(relHeight));
        writer.append(" ");
        writer.append(Joiner.on(" ").join(dynamismValues).toString());
        writer.append("\n");

      } catch (final IOException e) {
        checkState(false);
      }
      System.out.printf(" > dyn %1.3f+-%1.3f%n",
          +(sum / numSamples), sd.getResult());
      dataPoints.add(new Point(relHeight, (sum / numSamples)));
    }
    writer.close();
    Analysis.writeLocationList(dataPoints, new File(
        "files/test/times/intensity-analysis.txt"));
View Full Code Here

        double[] values = new double[length];
        for (int i = 0; i < length; i++) {
            values[i] = start + i;
        }

        StandardDeviation stdDev = new StandardDeviation();
        return stdDev.evaluate(values);
    }
View Full Code Here

        double[] values = new double[length];
        for (int i = 0; i < length; i++) {
            values[i] = start + i;
        }

        StandardDeviation stdDev = new StandardDeviation(false);
        return stdDev.evaluate(values);
    }
View Full Code Here

        double[] values = new double[length];
        for (int i = 0; i < length; i++) {
            values[i] = start + i;
        }

        StandardDeviation stdDev = new StandardDeviation(false);
        return stdDev.evaluate(values);
    }
View Full Code Here

        double[] values = new double[length];
        for (int i = 0; i < length; i++) {
            values[i] = start + i;
        }

        StandardDeviation stdDev = new StandardDeviation();
        return stdDev.evaluate(values);
    }
View Full Code Here

        double[] values = new double[length];
        for (int i = 0; i < length; i++) {
            values[i] = start + i;
        }

        StandardDeviation stdDev = new StandardDeviation();
        return stdDev.evaluate(values);
    }
View Full Code Here

        double[] values = new double[length];
        for (int i = 0; i < length; i++) {
            values[i] = start + i;
        }

        StandardDeviation stdDev = new StandardDeviation(false);
        return stdDev.evaluate(values);
    }
View Full Code Here

        double[] values = new double[length];
        for (int i = 0; i < length; i++) {
            values[i] = start + i;
        }

        StandardDeviation stdDev = new StandardDeviation(false);
        return stdDev.evaluate(values);
    }
View Full Code Here

        double[] values = new double[length];
        for (int i = 0; i < length; i++) {
            values[i] = start + i;
        }

        StandardDeviation stdDev = new StandardDeviation();
        return stdDev.evaluate(values);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.math3.stat.descriptive.moment.StandardDeviation

Copyright © 2018 www.massapicom. 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.