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


Java Statistics.calculateKurtosis方法代码示例

本文整理汇总了Java中org.jfree.data.statistics.Statistics.calculateKurtosis方法的典型用法代码示例。如果您正苦于以下问题:Java Statistics.calculateKurtosis方法的具体用法?Java Statistics.calculateKurtosis怎么用?Java Statistics.calculateKurtosis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.data.statistics.Statistics的用法示例。


在下文中一共展示了Statistics.calculateKurtosis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Summary

import org.jfree.data.statistics.Statistics; //导入方法依赖的package包/类
/**
 * calculate the statistical summary for the given dataset
 * @param dataset
 */
public Summary(PieDataset dataset){

	seriesCount = dataset.getItemCount();
	categoryCount = 1;
	
	cat_sampleSize = new int[categoryCount];
	cat_mean = new double[categoryCount];
	cat_median = new double[categoryCount];
	cat_stdDev = new double[categoryCount];
	cat_skew = new double[categoryCount];
	cat_kurt = new double[categoryCount];

	seriesName = new String[seriesCount];
	categoryName = new String[categoryCount];

	categoryName[0] = "Value";
	Double[] values = new Double[seriesCount];
	List<Double> valueList = new java.util.ArrayList<Double>();
	for (int i=0; i<seriesCount; i++){

		double v;
		if (dataset.getValue(i)!=null)
			v= dataset.getValue(i).doubleValue();	
		else v=0.0;
		values[i]=new Double(v);
		valueList.add(new Double(v));
	}
	
	cat_sampleSize[0]=valueList.size();
	cat_mean[0] = Statistics.calculateMean(values, false);
	cat_median[0] = Statistics.calculateMedian(valueList);
	cat_stdDev[0] = Statistics.getStdDev(values);
	cat_skew[0] = Statistics.calculateSkewness(values);
	cat_kurt[0] = Statistics.calculateKurtosis(values);

	return;
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:42,代码来源:Summary.java

示例2: getCellSummary

import org.jfree.data.statistics.Statistics; //导入方法依赖的package包/类
/**
* return summary for each table cell of  the given serie
* @param dataset
* @param serieIndex
* @return
*/
public String getCellSummary(CategoryDataset dataset, int serieIndex){
	String info ="";
	
	double mean, median, stdDev, skew, kurt;
	int sampleSize;


           for (int c = 0; c < categoryCount; c++) {

               Double[] values = createValueList(values_storage[serieIndex][c]);
			List<Double> valueList = new java.util.ArrayList<Double>();
			for (int i=0; i<values.length; i++)
				if(!Double.isNaN(values[i]))
				valueList.add(values[i]);
			sampleSize = valueList.size();
			mean = Statistics.calculateMean(values, false);
			median= Statistics.calculateMedian(valueList);
			stdDev = Statistics.getStdDev(values);
			skew = Statistics.calculateSkewness(values);
			kurt = Statistics.calculateKurtosis(values);

			String k = dataset.getRowKey(serieIndex).toString();
			if(k.length()>0)
				info += "["+k+".";
			else 
				info += "[";
			info += dataset.getColumnKey(c).toString()+"]:";
			info += " SampleSize="+setInfo(sampleSize);
			info += " Mean="+setInfo(mean);
			info += " Median="+setInfo(median);
			info += " stdDev="+setInfo(stdDev);
			info += " Skewness="+setInfo(skew);
			info += " Kurtosis="+setInfo(kurt);
			info +="\n";
           }
		return info;
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:44,代码来源:Summary.java


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