本文整理汇总了Java中org.apache.commons.math3.stat.descriptive.summary.SumOfLogs类的典型用法代码示例。如果您正苦于以下问题:Java SumOfLogs类的具体用法?Java SumOfLogs怎么用?Java SumOfLogs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SumOfLogs类属于org.apache.commons.math3.stat.descriptive.summary包,在下文中一共展示了SumOfLogs类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: MultivariateSummaryStatistics
import org.apache.commons.math3.stat.descriptive.summary.SumOfLogs; //导入依赖的package包/类
/**
* Construct a MultivariateSummaryStatistics instance
* @param k dimension of the data
* @param isCovarianceBiasCorrected if true, the unbiased sample
* covariance is computed, otherwise the biased population covariance
* is computed
*/
public MultivariateSummaryStatistics(int k, boolean isCovarianceBiasCorrected) {
this.k = k;
sumImpl = new StorelessUnivariateStatistic[k];
sumSqImpl = new StorelessUnivariateStatistic[k];
minImpl = new StorelessUnivariateStatistic[k];
maxImpl = new StorelessUnivariateStatistic[k];
sumLogImpl = new StorelessUnivariateStatistic[k];
geoMeanImpl = new StorelessUnivariateStatistic[k];
meanImpl = new StorelessUnivariateStatistic[k];
for (int i = 0; i < k; ++i) {
sumImpl[i] = new Sum();
sumSqImpl[i] = new SumOfSquares();
minImpl[i] = new Min();
maxImpl[i] = new Max();
sumLogImpl[i] = new SumOfLogs();
geoMeanImpl[i] = new GeometricMean();
meanImpl[i] = new Mean();
}
covarianceImpl =
new VectorialCovariance(k, isCovarianceBiasCorrected);
}
开发者ID:biocompibens,项目名称:SME,代码行数:33,代码来源:MultivariateSummaryStatistics.java
示例2: GeometricMean
import org.apache.commons.math3.stat.descriptive.summary.SumOfLogs; //导入依赖的package包/类
/**
* Create a GeometricMean instance
*/
public GeometricMean() {
sumOfLogs = new SumOfLogs();
}
开发者ID:biocompibens,项目名称:SME,代码行数:7,代码来源:GeometricMean.java
示例3: copy
import org.apache.commons.math3.stat.descriptive.summary.SumOfLogs; //导入依赖的package包/类
/**
* Copies source to dest.
* <p>Neither source nor dest can be null.</p>
*
* @param source SummaryStatistics to copy
* @param dest SummaryStatistics to copy to
* @throws NullArgumentException if either source or dest is null
*/
public static void copy(SummaryStatistics source, SummaryStatistics dest)
throws NullArgumentException {
MathUtils.checkNotNull(source);
MathUtils.checkNotNull(dest);
dest.maxImpl = source.maxImpl.copy();
dest.minImpl = source.minImpl.copy();
dest.sumImpl = source.sumImpl.copy();
dest.sumLogImpl = source.sumLogImpl.copy();
dest.sumsqImpl = source.sumsqImpl.copy();
dest.secondMoment = source.secondMoment.copy();
dest.n = source.n;
// Keep commons-math supplied statistics with embedded moments in synch
if (source.getVarianceImpl() instanceof Variance) {
dest.varianceImpl = new Variance(dest.secondMoment);
} else {
dest.varianceImpl = source.varianceImpl.copy();
}
if (source.meanImpl instanceof Mean) {
dest.meanImpl = new Mean(dest.secondMoment);
} else {
dest.meanImpl = source.meanImpl.copy();
}
if (source.getGeoMeanImpl() instanceof GeometricMean) {
dest.geoMeanImpl = new GeometricMean((SumOfLogs) dest.sumLogImpl);
} else {
dest.geoMeanImpl = source.geoMeanImpl.copy();
}
// Make sure that if stat == statImpl in source, same
// holds in dest; otherwise copy stat
if (source.geoMean == source.geoMeanImpl) {
dest.geoMean = (GeometricMean) dest.geoMeanImpl;
} else {
GeometricMean.copy(source.geoMean, dest.geoMean);
}
if (source.max == source.maxImpl) {
dest.max = (Max) dest.maxImpl;
} else {
Max.copy(source.max, dest.max);
}
if (source.mean == source.meanImpl) {
dest.mean = (Mean) dest.meanImpl;
} else {
Mean.copy(source.mean, dest.mean);
}
if (source.min == source.minImpl) {
dest.min = (Min) dest.minImpl;
} else {
Min.copy(source.min, dest.min);
}
if (source.sum == source.sumImpl) {
dest.sum = (Sum) dest.sumImpl;
} else {
Sum.copy(source.sum, dest.sum);
}
if (source.variance == source.varianceImpl) {
dest.variance = (Variance) dest.varianceImpl;
} else {
Variance.copy(source.variance, dest.variance);
}
if (source.sumLog == source.sumLogImpl) {
dest.sumLog = (SumOfLogs) dest.sumLogImpl;
} else {
SumOfLogs.copy(source.sumLog, dest.sumLog);
}
if (source.sumsq == source.sumsqImpl) {
dest.sumsq = (SumOfSquares) dest.sumsqImpl;
} else {
SumOfSquares.copy(source.sumsq, dest.sumsq);
}
}
开发者ID:biocompibens,项目名称:SME,代码行数:81,代码来源:SummaryStatistics.java
注:本文中的org.apache.commons.math3.stat.descriptive.summary.SumOfLogs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论