当前位置: 首页>>代码示例>>Java>>正文


Java StatisticalSummaryValues类代码示例

本文整理汇总了Java中org.apache.commons.math3.stat.descriptive.StatisticalSummaryValues的典型用法代码示例。如果您正苦于以下问题:Java StatisticalSummaryValues类的具体用法?Java StatisticalSummaryValues怎么用?Java StatisticalSummaryValues使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StatisticalSummaryValues类属于org.apache.commons.math3.stat.descriptive包,在下文中一共展示了StatisticalSummaryValues类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reduce

import org.apache.commons.math3.stat.descriptive.StatisticalSummaryValues; //导入依赖的package包/类
@Override
public void reduce(List<RevisionProcessor> workerProcessors) {
	List<SummaryStatistics> emptyStatisticsList = new ArrayList<SummaryStatistics>();
	List<SummaryStatistics> inconsistentStatisticsList = new ArrayList<SummaryStatistics>();
	List<SummaryStatistics> jsonExceptionStatisticsList = new ArrayList<SummaryStatistics>();
	List<SummaryStatistics> nullPointerExceptionStatisticsList = new ArrayList<SummaryStatistics>();
	
	List<SummaryStatistics> newJsonStatisticsList = new ArrayList<SummaryStatistics>();
	List<SummaryStatistics> oldJsonStatisticsList = new ArrayList<SummaryStatistics>();
	List<SummaryStatistics> redirectStatisticsList = new ArrayList<SummaryStatistics>();
	
	for (RevisionProcessor processor: workerProcessors) {
		JsonProcessor jsonProcessor = (JsonProcessor) processor;
		
		emptyStatisticsList.add(jsonProcessor.getEmptyJsonStatistics());
		inconsistentStatisticsList.add(jsonProcessor.getInconsistentJsonXMLStatistics());
		jsonExceptionStatisticsList.add(jsonProcessor.getJsonExceptionStatistics());
		nullPointerExceptionStatisticsList.add(jsonProcessor.getNullPointerExceptionStatistics());
		
		newJsonStatisticsList.add(jsonProcessor.getNewJsonStatistics());
		oldJsonStatisticsList.add(jsonProcessor.getOldJsonStatistics());
		redirectStatisticsList.add(jsonProcessor.getRedirectStatistics());
		
	}
	
	StatisticalSummaryValues emptyStatistics = AggregateSummaryStatistics.aggregate(emptyStatisticsList);
	StatisticalSummaryValues inconsistentStatistics = AggregateSummaryStatistics.aggregate(inconsistentStatisticsList);
	StatisticalSummaryValues jsonExceptionStatistics = AggregateSummaryStatistics.aggregate(jsonExceptionStatisticsList);
	StatisticalSummaryValues nullPointerExceptionStatistics = AggregateSummaryStatistics.aggregate(nullPointerExceptionStatisticsList);
	
	StatisticalSummaryValues newJsonStatistics = AggregateSummaryStatistics.aggregate(newJsonStatisticsList);
	StatisticalSummaryValues oldJsonStatistics = AggregateSummaryStatistics.aggregate(oldJsonStatisticsList);
	StatisticalSummaryValues redirectStatistics = AggregateSummaryStatistics.aggregate(redirectStatisticsList);
	
	logger.info("Number of revisions with empty 'text' element: " + emptyStatistics.getN());
	logger.info("Number of revisions with inconsistent JSON/XML item id: " + inconsistentStatistics.getN());		
	logger.info("Number of revisions whose 'text' element could not be parsed: " + jsonExceptionStatistics.getN());
	logger.info("Number of revisions which threw a NullPointerException: " + nullPointerExceptionStatistics.getN());
	long totalNumberOfFailures = emptyStatistics.getN() + inconsistentStatistics.getN() + jsonExceptionStatistics.getN() + nullPointerExceptionStatistics.getN();
	logger.info("Total number of revisions whose item document was discarded: " + totalNumberOfFailures);
	
	logger.info("Number of revisions in new JSON format: " + newJsonStatistics.getN());
	logger.info("Number of revisions in old JSON format: " + oldJsonStatistics.getN());
	logger.info("Number of revisions which represent a redirect: " + redirectStatistics.getN());
	long totalNumberOfSuccesses = newJsonStatistics.getN() + oldJsonStatistics.getN() + redirectStatistics.getN();
	logger.info("Total number of revisions whose item document was successfully parsed: " + totalNumberOfSuccesses);

}
 
开发者ID:heindorf,项目名称:cikm16-wdvd-feature-extraction,代码行数:49,代码来源:JsonProcessorReducer.java

示例2: getSystemStats

import org.apache.commons.math3.stat.descriptive.StatisticalSummaryValues; //导入依赖的package包/类
public StatisticalSummaryValues getSystemStats() {
	//		return this.aggregateStatsPerIndividual;
	return this.overallSummaryStatsPerIndividual.aggregate;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:5,代码来源:AbstractOwlSim.java

示例3: getSystemStats

import org.apache.commons.math3.stat.descriptive.StatisticalSummaryValues; //导入依赖的package包/类
public StatisticalSummaryValues getSystemStats(); 
开发者ID:owlcollab,项目名称:owltools,代码行数:2,代码来源:OwlSim.java


注:本文中的org.apache.commons.math3.stat.descriptive.StatisticalSummaryValues类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。