本文整理了Java中org.apache.commons.math3.stat.descriptive.moment.Variance.getResult()
方法的一些代码示例,展示了Variance.getResult()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Variance.getResult()
方法的具体详情如下:
包路径:org.apache.commons.math3.stat.descriptive.moment.Variance
类名称:Variance
方法名:getResult
暂无
代码示例来源:origin: org.apache.commons/commons-math3
/**
* {@inheritDoc}
*/
@Override
public double getResult() {
return FastMath.sqrt(variance.getResult());
}
代码示例来源:origin: org.apache.commons/commons-math3
/**
* Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
* population variance</a> of the values that have been added.
*
* <p>Double.NaN is returned if no values have been added.</p>
*
* @return the population variance
*/
public double getPopulationVariance() {
Variance populationVariance = new Variance(secondMoment);
populationVariance.setBiasCorrected(false);
return populationVariance.getResult();
}
代码示例来源:origin: org.apache.commons/commons-math3
/** {@inheritDoc} */
@Override
public double score(final List<? extends Cluster<T>> clusters) {
double varianceSum = 0.0;
for (final Cluster<T> cluster : clusters) {
if (!cluster.getPoints().isEmpty()) {
final Clusterable center = centroidOf(cluster);
// compute the distance variance of the current cluster
final Variance stat = new Variance();
for (final T point : cluster.getPoints()) {
stat.increment(distance(point, center));
}
varianceSum += stat.getResult();
}
}
return varianceSum;
}
代码示例来源:origin: org.apache.commons/commons-math3
stat.increment(point.distanceFrom(center));
final double variance = stat.getResult();
代码示例来源:origin: org.apache.commons/commons-math3
stat.increment(distance(point, center));
final double variance = stat.getResult();
代码示例来源:origin: org.apache.commons/commons-math3
stat.increment(point.distanceFrom(center));
varianceSum += stat.getResult();
代码示例来源:origin: org.apache.commons/commons-math3
variance.incrementAll(values, begin, length);
double mean = variance.moment.m1;
double stdDev = FastMath.sqrt(variance.getResult());
代码示例来源:origin: meyerjp3/psychometrics
/**
* Observed variance of the estimate.
*
* @return observed variance.
*/
public double observedVariance(){
return var.getResult();
}
代码示例来源:origin: geogebra/geogebra
/**
* {@inheritDoc}
*/
@Override
public double getResult() {
return Math.sqrt(variance.getResult());
}
代码示例来源:origin: meyerjp3/psychometrics
/**
* Observed standard deviation of the estimate.
*
* @return stanmdard deviation.
*/
public double observedStandardDeviation(){
return Math.sqrt(var.getResult());
}
代码示例来源:origin: meyerjp3/psychometrics
/**
* An adjusted variance for computing scale quality statistics.
*
* @return adjusted variance.
*/
public double adjustedVariance(){
return Math.max(0,var.getResult() - meanSquareError());//can be negative. constrain to be nonnegative
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* {@inheritDoc}
*/
@Override
public double getResult() {
return FastMath.sqrt(variance.getResult());
}
代码示例来源:origin: meyerjp3/psychometrics
/**
* Reliability is the reproduceability of the item or person estimates.
*
* @return reliability of the estimates.
*/
public double reliability(){
return adjustedVariance()/var.getResult();
}
代码示例来源:origin: Jasig/uPortal
/**
* Returns the (sample) variance of the available values.
*
* <p>This method returns the bias-corrected sample variance (using {@code n - 1} in the
* denominator). Use {@link #getPopulationVariance()} for the non-bias-corrected population
* variance.
*
* <p>Double.NaN is returned if no values have been added.
*
* @return the variance
*/
@Override
public double getVariance() {
return _getVariance().getResult();
}
代码示例来源:origin: geogebra/geogebra
/**
* Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
* population variance</a> of the values that have been added.
*
* <p>Double.NaN is returned if no values have been added.</p>
*
* @return the population variance
*/
public double getPopulationVariance() {
Variance populationVariance = new Variance(secondMoment);
populationVariance.setBiasCorrected(false);
return populationVariance.getResult();
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
* population variance</a> of the values that have been added.
*
* <p>Double.NaN is returned if no values have been added.</p>
*
* @return the population variance
*/
public double getPopulationVariance() {
Variance populationVariance = new Variance(secondMoment);
populationVariance.setBiasCorrected(false);
return populationVariance.getResult();
}
代码示例来源:origin: Jasig/uPortal
/**
* Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">population
* variance</a> of the values that have been added.
*
* <p>Double.NaN is returned if no values have been added.
*
* @return the population variance
*/
@Override
public double getPopulationVariance() {
Variance populationVariance = new Variance(_getSecondMoment());
populationVariance.setBiasCorrected(false);
return populationVariance.getResult();
}
代码示例来源:origin: zavtech/morpheus-core
public static void main(String[] args) {
final double[] values = new java.util.Random().doubles(5000).toArray();
final Variance stat1 = new Variance(true);
final org.apache.commons.math3.stat.descriptive.moment.Variance stat2 = new org.apache.commons.math3.stat.descriptive.moment.Variance(true);
for (double value : values) {
stat1.add(value);
stat2.increment(value);
}
final double result1 = stat1.getValue();
final double result2 = stat2.getResult();
if (result1 != result2) {
throw new RuntimeException("Error: " + result1 + " != " + result2);
}
}
代码示例来源:origin: geogebra/geogebra
/** {@inheritDoc} */
@Override
public double score(final List<? extends Cluster<T>> clusters) {
double varianceSum = 0.0;
for (final Cluster<T> cluster : clusters) {
if (!cluster.getPoints().isEmpty()) {
final Clusterable center = centroidOf(cluster);
// compute the distance variance of the current cluster
final Variance stat = new Variance();
for (final T point : cluster.getPoints()) {
stat.increment(distance(point, center));
}
varianceSum += stat.getResult();
}
}
return varianceSum;
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/** {@inheritDoc} */
@Override
public double score(final List<? extends Cluster<T>> clusters) {
double varianceSum = 0.0;
for (final Cluster<T> cluster : clusters) {
if (!cluster.getPoints().isEmpty()) {
final Clusterable center = centroidOf(cluster);
// compute the distance variance of the current cluster
final Variance stat = new Variance();
for (final T point : cluster.getPoints()) {
stat.increment(distance(point, center));
}
varianceSum += stat.getResult();
}
}
return varianceSum;
}
内容来源于网络,如有侵权,请联系作者删除!