本文整理汇总了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;
}
示例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;
}