Examples of mean()


Examples of ch.idsia.utils.StatisticalSummary.mean()

        options.setLevelDifficulty(level);
        options.setPauseWorld(paused);
        StatisticalSummary ss = test (controller, options, seed, level);
        System.out.printf("Level %d %s %.4f (%.4f) (min %.4f max %.4f) (avg time %.4f)\n",
                level, paused ? "paused" : "unpaused",
                ss.mean(), ss.sd(), ss.min(), ss.max(), controller.averageTimeTaken());
        return ss.mean();
    }


    public static StatisticalSummary test (TimingAgent controller, EvaluationOptions options, int seed, int level) {
View Full Code Here

Examples of ch.idsia.utils.StatisticalSummary.mean()

        options.setPauseWorld(paused);
        StatisticalSummary ss = test (controller, options, seed, level);
        System.out.printf("Level %d %s %.4f (%.4f) (min %.4f max %.4f) (avg time %.4f)\n",
                level, paused ? "paused" : "unpaused",
                ss.mean(), ss.sd(), ss.min(), ss.max(), controller.averageTimeTaken());
        return ss.mean();
    }


    public static StatisticalSummary test (TimingAgent controller, EvaluationOptions options, int seed, int level) {
        StatisticalSummary ss = new StatisticalSummary ();
View Full Code Here

Examples of ch.idsia.utils.StatisticalSummary.mean()

        options.setLevelDifficulty(level);
        options.setPauseWorld(paused);
        StatisticalSummary ss = test (controller, options, seed);
        double averageTimeTaken = controller.averageTimeTaken();
        System.out.printf("Difficulty %d score %.4f (avg time %.4f)\n",
                level, ss.mean(), averageTimeTaken);
        if (averageTimeTaken > 40) {
            System.out.println("Maximum allowed average time is 40 ms per time step.\n" +
                    "Controller disqualified");
            System.exit (0);
        }
View Full Code Here

Examples of ch.idsia.utils.StatisticalSummary.mean()

        if (averageTimeTaken > 40) {
            System.out.println("Maximum allowed average time is 40 ms per time step.\n" +
                    "Controller disqualified");
            System.exit (0);
        }
        return ss.mean();
    }

    public static StatisticalSummary test (Agent controller, EvaluationOptions options, int seed) {
        StatisticalSummary ss = new StatisticalSummary ();
        for (int i = 0; i < numberOfTrials; i++) {
View Full Code Here

Examples of com.yahoo.ycsb.generator.IntegerGenerator.mean()

       p.getProperty(Client.INSERT_COUNT_PROPERTY) != null ||
       p.getProperty(Client.OPERATION_COUNT_PROPERTY) != null) {
      System.err.println("Warning: record, insert or operation count was set prior to initting ConstantOccupancyWorkload.  Overriding old values.");
    }
    IntegerGenerator g = CoreWorkload.getFieldLengthGenerator(p);
    double fieldsize = g.mean();
    int fieldcount = Integer.parseInt(p.getProperty(FIELD_COUNT_PROPERTY, FIELD_COUNT_PROPERTY_DEFAULT));

    object_count = (long)(occupancy * ((double)disksize / (fieldsize * (double)fieldcount)));
                if(object_count == 0) {
                    throw new IllegalStateException("Object count was zero.  Perhaps disksize is too low?");
View Full Code Here

Examples of com.yammer.metrics.core.Histogram.mean()

               assertEquals(messageBytes.length + tcpTransportHeaderSize,flushByteCounts[0]);
               assertEquals(0, flushByteCounts[1]);
              
               // verify the histogram
               Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
               assertEquals(1.0D,histogram.mean(),0.0000001);
               assertEquals(1,histogram.count());
            }
            finally
            {
               if (factory != null)
View Full Code Here

Examples of com.yammer.metrics.core.Histogram.mean()

               assertEquals(largeMessageBytes.length + tcpTransportHeaderSize,flushByteCounts[2]);
               assertEquals(0,flushByteCounts[3]);
              
               // verify the histogram
               Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
               assertEquals(calcMean(1,2,1),histogram.mean(),0.0000001);
               assertEquals(3,histogram.count());
            }
            finally
            {
               if (factory != null)
View Full Code Here

Examples of com.yammer.metrics.core.Histogram.mean()

              
               if (shouldBatch)
               {
                  // verify the histogram
                  Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
                  assertEquals(calcMean(2),histogram.mean(),0.0000001);
                  assertEquals(1,histogram.count());
               }
            }
            finally
            {
View Full Code Here

Examples of com.yammer.metrics.core.Histogram.mean()

               assertEquals(sentBytesPerMessage,flushByteCounts[2]);
               assertEquals(0, flushByteCounts[3]);
              
               // verify the histogram
               Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
               assertEquals(calcMean(1,2,1),histogram.mean(),0.0000001);
               assertEquals(3,histogram.count());
            }
            finally
            {
               if (factory != null)
View Full Code Here

Examples of com.yammer.metrics.core.Histogram.mean()

               assertEquals(numBytesLastFlush,flushByteCounts[0]);
               assertEquals(numBytesSent - numBytesLastFlush, flushByteCounts[1]);
              
               // verify the histogram
               Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
               assertEquals(calcMean((numMessagesSent - 1),1),histogram.mean(),0.0000001);
               assertEquals(2,histogram.count());
            }
            finally
            {
               if (factory != null)
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.