Examples of mean()


Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.mean()

            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(6l));
            assertThat(facet.total(), equalTo(13d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(13d / 6d));
            assertThat(facet.sumOfSquares(), equalTo(35d));

            // test cross field facet using the same facet name...
            searchResponse = client.prepareSearch()
                    .setQuery(matchAllQuery())
View Full Code Here

Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.mean()

            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(6l));
            assertThat(facet.total(), equalTo(13d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(13d / 6d));
            assertThat(facet.sumOfSquares(), equalTo(35d));
        }
    }

    @Test public void testHistoFacetEdge() throws Exception {
View Full Code Here

Examples of org.geotools.math.Statistics.mean()

        StringBuilder sb = new StringBuilder();
        sb.append("<table><thead><tr><td>Type name</td><td>Count</td><td>Min</td><td>Max</td><td>Avg</td><td>Total</td></tr></thead>");
        for(Entry<Name, Statistics> e : serializationMillisByType.entrySet()) {
            Statistics st = e.getValue();
            sb.append("<tr><td>").append(e.getKey()).append("</td><td>").append(st.count()).append("</td><td>")
                .append(st.minimum()).append("</td><td>").append(st.maximum()).append("</td><td>").append(st.mean())
                .append("</td><td>").append(st.mean()*st.count()).append("</td></tr>");
        }
        sb.append("</table>");
        return sb.toString();
    }
View Full Code Here

Examples of org.geotools.math.Statistics.mean()

        sb.append("<table><thead><tr><td>Type name</td><td>Count</td><td>Min</td><td>Max</td><td>Avg</td><td>Total</td></tr></thead>");
        for(Entry<Name, Statistics> e : serializationMillisByType.entrySet()) {
            Statistics st = e.getValue();
            sb.append("<tr><td>").append(e.getKey()).append("</td><td>").append(st.count()).append("</td><td>")
                .append(st.minimum()).append("</td><td>").append(st.maximum()).append("</td><td>").append(st.mean())
                .append("</td><td>").append(st.mean()*st.count()).append("</td></tr>");
        }
        sb.append("</table>");
        return sb.toString();
    }
   
View Full Code Here

Examples of org.grouplens.lenskit.vectors.SparseVector.mean()

                Ratings.make(42, 22, 3));
        UserHistory<Event> history = History.forUser(42, events);
        assertThat(history, hasSize(3));
        SparseVector v = history.memoize(RatingVectorUserHistorySummarizer.SummaryFunction.INSTANCE);
        assertThat(v.size(), equalTo(3));
        assertThat(v.mean(), equalTo(3.0));
        assertThat(history.memoize(RatingVectorUserHistorySummarizer.SummaryFunction.INSTANCE),
                   sameInstance(v));
    }

    @Test
View Full Code Here

Examples of org.jquantlib.math.statistics.GenericSequenceStatistics.mean()

                           + "    expected:   " + expected);
        }

        expected = 4.3;
        tolerance = 1.0e-9;
        calculated = ss.mean();
        for (i=0; i<dimension; i++) {
            if (Math.abs(calculated.get(i)-expected) > tolerance)
                fail("SequenceStatistics<" + name + ">: "
                           + (i+1) + " dimension: "
                           + "wrong mean value\n"
View Full Code Here

Examples of org.jquantlib.math.statistics.Statistics.mean()

        // the sampleAccumulator method
        // gives access to all the methods of statisticsAccumulator
        final Statistics s = MCSimulation.sampleAccumulator();

        /* @Real */final double PLMean = s.mean();
        /* @Real */final double PLStDev = MCSimulation.sampleAccumulator()
        .standardDeviation();
        /* @Real */final double PLSkew = MCSimulation.sampleAccumulator().skewness();
        /* @Real */final double PLKurt = MCSimulation.sampleAccumulator().kurtosis();

View Full Code Here

Examples of water.fvec.Vec.mean()

        int i=0;
        for (Object h : hs) {thresholds[i++] = (Float)h; }
        sort(thresholds);
      }
      // compute CMs
      aucdata = new AUCData().compute(new AUCTask(thresholds,va.mean()).doAll(va,vp).getCMs(), thresholds, va.factors(), threshold_criterion);
    } finally {       // Delete adaptation vectors
      if (va!=null) DKV.remove(va._key);
    }
  }
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.