• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ChiSquaredDistributionImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: isFamilyTestSignificant

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
/**
 * Returns whether the test statistic S indicates a signficantly different
 * configuration given significance level alpha.
 * 
 * @param S
 * @param alpha
 * @return
 * @throws MathException
 */
public boolean isFamilyTestSignificant(double S, double alpha) throws MathException {
    ChiSquaredDistribution XS = new ChiSquaredDistributionImpl(k - 1);
    return S > XS.inverseCumulativeProbability(1.0 - alpha);
}
 
开发者ID:EDACC,项目名称:edacc_aac,代码行数:14,代码来源:FriedmanCensoredTest.java


示例17: isFamilyTestSignificant

import org.apache.commons.math.distribution.ChiSquaredDistributionImpl; //导入依赖的package包/类
/**
 * Return whether the family-wise test statistic value T indicates
 * significant differences at level alpha.
 * 
 * @param T
 *            test statistic value returned by
 *            <code>familyTestStatistic()</code>
 * @param alpha
 *            significance level
 * @return
 * @throws MathException
 */
public boolean isFamilyTestSignificant(double T, double alpha) throws MathException {
    ChiSquaredDistribution XS = new ChiSquaredDistributionImpl(m - 1);
    //System.out.println("T-value: " + T + " >? Quantile: " + XS.inverseCumulativeProbability(1.0 - alpha));
    return T > XS.inverseCumulativeProbability(1.0 - alpha);
}
 
开发者ID:EDACC,项目名称:edacc_aac,代码行数:18,代码来源:FriedmanTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MessageContextFactory类代码示例发布时间:2022-05-22
下一篇:
Java FloatArrayList类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap