本文整理汇总了Java中org.apache.commons.math3.stat.descriptive.SummaryStatistics.getMin方法的典型用法代码示例。如果您正苦于以下问题:Java SummaryStatistics.getMin方法的具体用法?Java SummaryStatistics.getMin怎么用?Java SummaryStatistics.getMin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.stat.descriptive.SummaryStatistics
的用法示例。
在下文中一共展示了SummaryStatistics.getMin方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStats
import org.apache.commons.math3.stat.descriptive.SummaryStatistics; //导入方法依赖的package包/类
private static Stats getStats(FloatColumn values, SummaryStatistics summaryStatistics) {
Stats stats = new Stats("Column: " + values.name());
stats.min = (float) summaryStatistics.getMin();
stats.max = (float) summaryStatistics.getMax();
stats.n = summaryStatistics.getN();
stats.sum = summaryStatistics.getSum();
stats.variance = summaryStatistics.getVariance();
stats.populationVariance = summaryStatistics.getPopulationVariance();
stats.quadraticMean = summaryStatistics.getQuadraticMean();
stats.geometricMean = summaryStatistics.getGeometricMean();
stats.mean = summaryStatistics.getMean();
stats.standardDeviation = summaryStatistics.getStandardDeviation();
stats.sumOfLogs = summaryStatistics.getSumOfLogs();
stats.sumOfSquares = summaryStatistics.getSumsq();
stats.secondMoment = summaryStatistics.getSecondMoment();
return stats;
}
示例2: computeStats
import org.apache.commons.math3.stat.descriptive.SummaryStatistics; //导入方法依赖的package包/类
private void computeStats() {
SummaryStatistics centroidStats = new SummaryStatistics();
SummaryStatistics edgeStats = new SummaryStatistics();
for (IFeature poi : pois) {
centroidStats.addValue(getDistToCentroid().get(poi));
edgeStats.addValue(getDistToEdge().get(poi));
}
meanDistanceCentroid = centroidStats.getMean();
stdDistanceCentroid = centroidStats.getStandardDeviation();
minDistanceCentroid = centroidStats.getMin();
maxDistanceCentroid = centroidStats.getMax();
meanDistanceEdge = edgeStats.getMean();
stdDistanceEdge = edgeStats.getStandardDeviation();
minDistanceEdge = edgeStats.getMin();
maxDistanceEdge = edgeStats.getMax();
}
示例3: getSummaryStatisticsForCollection
import org.apache.commons.math3.stat.descriptive.SummaryStatistics; //导入方法依赖的package包/类
/**
* This function will take an aggregated collection of Summary Statistics
* and will generate a derived {@link SummaryStatistic} based on a flag for the
* desired summation. This is particularly helpful for finding out the
* means of the individual statistics of the collection.
* For example, if you wanted to find out the mean of means of the collection
* you would call this function like <p>
* getSummaryStatisticsForCollection(aggregate,1).getMean(); <p>
* Or if you wanted to determine the max number of annotations per
* individual, you could call: <p>
* getSummaryStatisticsForCollection(aggregate,5).getMax(); <p>
* The stat flag should be set to the particular individual statistic that should
* be summarized over.
*
* @param aggregate The aggregated collection of summary statistics
* @param stat Integer flag for the statistic (1:mean ; 2:sum; 3:min; 4:max; 5:N)
* @return {@link SummaryStatistics} of the selected statistic
*/
public SummaryStatistics getSummaryStatisticsForCollection(Collection<SummaryStatistics> aggregate, Stat stat) {
//LOG.info("Computing stats over collection of "+aggregate.size()+" elements ("+stat+"):");
//TODO: turn stat into enum
int x = 0;
//To save memory, I am using SummaryStatistics, which does not store the values,
//but this could be changed to DescriptiveStatistics to see values
//as well as other statistical functions like distributions
SummaryStatistics stats = new SummaryStatistics();
Double v = 0.0;
ArrayList<String> vals = new ArrayList();
for (SummaryStatistics s : aggregate) {
switch (stat) {
case MEAN : v= s.getMean(); stats.addValue(s.getMean()); break;
case SUM : v=s.getSum(); stats.addValue(s.getSum()); break;
case MIN : v=s.getMin(); stats.addValue(s.getMin()); break;
case MAX : v=s.getMax(); stats.addValue(s.getMax()); break;
case N : v= ((int)s.getN())*1.0; stats.addValue(s.getN()); break;
};
//vals.add(v.toString());
};
//LOG.info("vals: "+vals.toString());
return stats;
}
示例4: setWeek
import org.apache.commons.math3.stat.descriptive.SummaryStatistics; //导入方法依赖的package包/类
/**
* Sets min, max, mean, and deviation for a week
*
* @param week Statistics for the week
*/
public void setWeek(SummaryStatistics week)
{
this.weekMin = week.getMin();
this.weekMax = week.getMax();
this.weekAvg = week.getMean();
this.weekDeviation = week.getStandardDeviation();
}
示例5: setMonth
import org.apache.commons.math3.stat.descriptive.SummaryStatistics; //导入方法依赖的package包/类
/**
* Sets min, max, mean, and deviation for a month.
*
* @param month Statistics for the month.
*/
public void setMonth(SummaryStatistics month)
{
this.monthMin = month.getMin();
this.monthMax = month.getMax();
this.monthAvg = month.getMean();
this.monthDeviation = month.getStandardDeviation();
}
示例6: setYear
import org.apache.commons.math3.stat.descriptive.SummaryStatistics; //导入方法依赖的package包/类
/**
* Sets min, max, mean, and deviation for a year.
*
* @param year Statistics for the year.
*/
public void setYear(SummaryStatistics year)
{
this.yearMin = year.getMin();
this.yearMax = year.getMax();
this.yearAvg = year.getMean();
this.yearDeviation = year.getStandardDeviation();
}
示例7: setAll
import org.apache.commons.math3.stat.descriptive.SummaryStatistics; //导入方法依赖的package包/类
/**
* Sets min, max, mean, and deviation for a all.
*
* @param all Statistics for the all.
*/
public void setAll(SummaryStatistics all)
{
this.allMin = all.getMin();
this.allMax = all.getMax();
this.allAvg = all.getMean();
this.allDeviation = all.getStandardDeviation();
}
示例8: getKernel
import org.apache.commons.math3.stat.descriptive.SummaryStatistics; //导入方法依赖的package包/类
@Override
protected RealDistribution getKernel(SummaryStatistics bStats) {
return new UniformRealDistribution(randomData.getRandomGenerator(), bStats.getMin(), bStats.getMax(),
UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
}