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


Java ChiSquaredDistributionImpl类代码示例

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


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

示例1: pchisq

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public static double pchisq(final double q, final double df, boolean lowerTail, boolean logP) {
  if(df == 0) {
    return p(new ChisquareZeroDfDistribution(), q, lowerTail, logP);
  } else {
    return p(new ChiSquaredDistributionImpl(df), q, lowerTail, logP);
  }
}
 
开发者ID:CompEvol,项目名称:beastshell,代码行数:8,代码来源:Distributions.java

示例2: qchisq

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public static double qchisq(final double p, final double df, boolean lowerTail, boolean logP) {
  if(df == 0) {
    return q(new ChisquareZeroDfDistribution(), p, lowerTail, logP);
  } else {
    return q(new ChiSquaredDistributionImpl(df), p, lowerTail, logP);
  }
}
 
开发者ID:CompEvol,项目名称:beastshell,代码行数:8,代码来源:Distributions.java

示例3: chiSquareTest

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
/**
 * @param counts array representation of 2-way table
 * @return p-value
 * @throws MathIllegalArgumentException if preconditions are not met
 * @throws MathException if an error occurs computing the p-value
 */
public double chiSquareTest(long[][] counts)
throws MathException {
    checkArray(counts);
    double df = ((double) counts.length -1) * ((double) counts[0].length - 1);
    distribution = new ChiSquaredDistributionImpl(df);
    return 1 - distribution.cumulativeProbability(chiSquare(counts));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:14,代码来源:ChiSquareTestImpl.java

示例4: testNextChiSquare

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public void testNextChiSquare() throws Exception {
    double[] quartiles = TestUtils.getDistributionQuartiles(new ChiSquaredDistributionImpl(12));
    long[] counts = new long[4];
    randomData.reSeed(1000);
    for (int i = 0; i < 1000; i++) {
        double value = randomData.nextChiSquare(12);
        TestUtils.updateCounts(value, counts, quartiles);
    }
    TestUtils.assertChiSquareAccept(expected, counts, 0.001);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:11,代码来源:RandomDataTest.java

示例5: testNextChiSquare

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
@Test
public void testNextChiSquare() throws Exception {
    double[] quartiles = TestUtils.getDistributionQuartiles(new ChiSquaredDistributionImpl(12));
    long[] counts = new long[4];
    randomData.reSeed(1000);
    for (int i = 0; i < 1000; i++) {
        double value = randomData.nextChiSquare(12);
        TestUtils.updateCounts(value, counts, quartiles);
    }
    TestUtils.assertChiSquareAccept(expected, counts, 0.001);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:12,代码来源:RandomDataTest.java

示例6: pchisq

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public static double pchisq(@Recycle double q, @Recycle double df, boolean lowerTail, boolean logP) {
  if(df == 0) {
    return p(new ChisquareZeroDfDistribution(), q, lowerTail, logP);
  } else {
    return p(new ChiSquaredDistributionImpl(df), q, lowerTail, logP);
  }
}
 
开发者ID:bedatadriven,项目名称:renjin-statet,代码行数:8,代码来源:Distributions.java

示例7: qchisq

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public static double qchisq(@Recycle double p, @Recycle double df, boolean lowerTail, boolean logP) {
  if(df == 0) {
    return q(new ChisquareZeroDfDistribution(), p, lowerTail, logP);
  } else {
    return q(new ChiSquaredDistributionImpl(df), p, lowerTail, logP);
  }
}
 
开发者ID:bedatadriven,项目名称:renjin-statet,代码行数:8,代码来源:Distributions.java

示例8: ChiSquareTestImpl

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
/**
 * Construct a ChiSquareTestImpl 
 */
public ChiSquareTestImpl() {
    this(new ChiSquaredDistributionImpl(1.0));
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:7,代码来源:ChiSquareTestImpl.java

示例9: dchisq

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public static double dchisq(final double x, final double df, boolean log) {
  return d(new ChiSquaredDistributionImpl(df), x, log);
}
 
开发者ID:CompEvol,项目名称:beastshell,代码行数:4,代码来源:Distributions.java

示例10: ChiSquareTestImpl

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
/**
 * Construct a ChiSquareTestImpl
 */
public ChiSquareTestImpl() {
    this(new ChiSquaredDistributionImpl(1.0));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:7,代码来源:ChiSquareTestImpl.java

示例11: criticalValue

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public double criticalValue(double alpha) throws MathException {
    ChiSquaredDistribution XS = new ChiSquaredDistributionImpl(k - 1);
    return XS.inverseCumulativeProbability(1.0 - alpha);
}
 
开发者ID:EDACC,项目名称:edacc_aac,代码行数:5,代码来源:FriedmanCensoredTest.java

示例12: criticalValue

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public double criticalValue(double alpha) throws MathException {
    ChiSquaredDistribution XS = new ChiSquaredDistributionImpl(m - 1);
    return XS.inverseCumulativeProbability(1.0 - alpha);
}
 
开发者ID:EDACC,项目名称:edacc_aac,代码行数:5,代码来源:FriedmanTest.java

示例13: dchisq

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
public static double dchisq(@Recycle double x, @Recycle double df, boolean log) {
  return d(new ChiSquaredDistributionImpl(df), x, log);
}
 
开发者ID:bedatadriven,项目名称:renjin-statet,代码行数:4,代码来源:Distributions.java

示例14: chiSquareTestDataSetsComparison

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
/**
 * @param observed1 array of observed frequency counts of the first data set
 * @param observed2 array of observed frequency counts of the second data set
 * @return p-value
 * @throws MathIllegalArgumentException if preconditions are not met
 * @throws MathException if an error occurs computing the p-value
 * @since 1.2
 */
public double chiSquareTestDataSetsComparison(long[] observed1, long[] observed2)
    throws MathException {
    distribution = new ChiSquaredDistributionImpl((double) observed1.length - 1);
    return 1 - distribution.cumulativeProbability(
            chiSquareDataSetsComparison(observed1, observed2));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:15,代码来源:ChiSquareTestImpl.java

示例15: nextChiSquare

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
/**
 * Generates a random value from the {@link ChiSquaredDistributionImpl ChiSquare Distribution}.
 * This implementation uses {@link #nextInversionDeviate(ContinuousDistribution) inversion}
 * to generate random values.
 *
 * @param df the degrees of freedom of the ChiSquare distribution
 * @return random value sampled from the ChiSquare(df) distribution
 * @throws MathException if an error occurs generating the random value
 * @since 2.2
 */
public double nextChiSquare(double df) throws MathException {
    return nextInversionDeviate(new ChiSquaredDistributionImpl(df));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:14,代码来源:RandomDataImpl.java


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