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

Java ChiSquare类代码示例

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

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



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

示例1: assertWellBalanced

import cern.jet.random.ChiSquare; //导入依赖的package包/类
private void assertWellBalanced(int numNodes, Multiset<Integer> ids) {
    // compute the chi-sq statistic
    double expected = ids.size() / (double) numNodes;
    double chiSq = 0.0;
    int df = numNodes - 1;
    NumberFormat prct = NumberFormat.getPercentInstance();
    prct.setMaximumFractionDigits(4);
    NumberFormat num = NumberFormat.getInstance();
    num.setMaximumFractionDigits(4);
    num.setMinimumFractionDigits(4);
    System.out.println("node\treqs\tX^2\tskew");
    for(Integer id: ids.elementSet()) {
        System.out.println(id + "\t" + ids.count(id) + "\t"
                           + num.format(chiSq(ids.count(id), expected)) + "\t"
                           + prct.format((ids.count(id) - expected) / expected));
        chiSq += chiSq(ids.count(id), expected);
    }
    System.out.println("X^2 = " + chiSq);
    ChiSquare dist = new ChiSquare(df, new MersenneTwister());
    // p-value is ~= prob of seeing this distribution from fair router
    double pValue = 1.0 - dist.cdf(chiSq);
    System.out.println("p-value = " + pValue);
    assertTrue("Non-uniform load distribution detected.", pValue >= 0.05);
}
 
开发者ID:we7,项目名称:voldemort,代码行数:25,代码来源:ConsistentRoutingStrategyTest.java


示例2: EnrichmentSignificance

import cern.jet.random.ChiSquare; //导入依赖的package包/类
public EnrichmentSignificance(EventsConfig con, ExperimentManager exptman, BindingManager bman, double minFoldChange, double genomeLength){
	this.config = con;
	this.manager = exptman;
	this.bindingManager = bman;
	this.minFoldChange = minFoldChange;
	this.genomeLength = genomeLength;
	binomial = new Binomial(100, .5, new DRand());
	poisson = new Poisson(1, new DRand());
	chisquare = new ChiSquare(1, new DRand());
}
 
开发者ID:seqcode,项目名称:chexmix,代码行数:11,代码来源:EnrichmentSignificance.java


示例3: ChiSquareDistribution

import cern.jet.random.ChiSquare; //导入依赖的package包/类
/**
 * @param degrees The degrees of freedom of the distribution, not less than one
 * @param engine A uniform random number generator, not null
 */
public ChiSquareDistribution(final double degrees, final RandomEngine engine) {
  Validate.isTrue(degrees >= 1, "Degrees of freedom must be greater than or equal to one");
  Validate.notNull(engine);
  _chiSquare = new ChiSquare(degrees, engine);
  _degrees = degrees;
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:11,代码来源:ChiSquareDistribution.java


示例4: EnrichmentSignificance

import cern.jet.random.ChiSquare; //导入依赖的package包/类
public EnrichmentSignificance(Config con, ExperimentSet exptSet, List<BindingEvent> features, double minFoldChange, double genomeLength){
	this.config = con;
	this.exptSet = exptSet;
	this.features = features;
	this.minFoldChange = minFoldChange;
	this.genomeLength = genomeLength;
	binomial = new Binomial(100, .5, new DRand());
	poisson = new Poisson(1, new DRand());
	chisquare = new ChiSquare(1, new DRand());
}
 
开发者ID:shaunmahony,项目名称:multigps-archive,代码行数:11,代码来源:EnrichmentSignificance.java


示例5: ExperienceSanityCheck

import cern.jet.random.ChiSquare; //导入依赖的package包/类
ExperienceSanityCheck() {
	freedom = 6; // osi x
	k = 15;

	chi = new ChiSquare(freedom,
			cern.jet.random.ChiSquare.makeDefaultGenerator());
	// sigmoidCurve = new SigmoidCurve();

	checkChi();
	checkSigmoid();

	EpsilonCutValue = checkEpsilonFromChi();
}
 
开发者ID:wikiteams,项目名称:aon-emerging-wikiteams,代码行数:14,代码来源:Experience.java


示例6: sampleVar

import cern.jet.random.ChiSquare; //导入依赖的package包/类
public double sampleVar() { 
	double diff = (double)(getN() - getK());
	ChiSquare chiSquare = new cern.jet.random.ChiSquare(diff, engine);
	double x = chiSquare.nextDouble();
	return (diff * s2) / x;
}
 
开发者ID:seqcode,项目名称:seqcode-core,代码行数:7,代码来源:DataRegression.java


示例7: LearningCurve

import cern.jet.random.ChiSquare; //导入依赖的package包/类
LearningCurve() {
	say("Object LearningCurve created, with ref: " + this);
	chi = new ChiSquare(freedom,
			cern.jet.random.ChiSquare.makeDefaultGenerator());
}
 
开发者ID:wikiteams,项目名称:aon-emerging-wikiteams,代码行数:6,代码来源:Experience.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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