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

Java UnivariateStatistic类代码示例

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

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



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

示例1: testAllTechniquesSingleton

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
@Test
public void testAllTechniquesSingleton() {
    double[] singletonArray = new double[] { 1d };
    for (EstimationType e : EstimationType.values()) {
        UnivariateStatistic percentile = getTestMedian(e);
        Assert.assertEquals(1d, percentile.evaluate(singletonArray), 0);
        Assert.assertEquals(1d, percentile.evaluate(singletonArray, 0, 1),
                0);
        Assert.assertEquals(1d,
                new Median().evaluate(singletonArray, 0, 1, 5), 0);
        Assert.assertEquals(1d,
                new Median().evaluate(singletonArray, 0, 1, 100), 0);
        Assert.assertTrue(Double.isNaN(percentile.evaluate(singletonArray,
                0, 0)));
    }
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:17,代码来源:MedianTest.java


示例2: testAllTechniquesNullEmpty

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
@Test
public void testAllTechniquesNullEmpty() {

    final double[] nullArray = null;
    final double[] emptyArray = new double[] {};
    for (final Percentile.EstimationType e : Percentile.EstimationType.values()) {
        reset (50, e);
        final UnivariateStatistic percentile = getUnivariateStatistic();
        try {
            percentile.evaluate(nullArray);
            Assert.fail("Expecting MathIllegalArgumentException "
                    + "for null array");
        } catch (final MathIllegalArgumentException ex) {
            // expected
        }
        Assert.assertTrue(Double.isNaN(percentile.evaluate(emptyArray)));
    }

}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:20,代码来源:PercentileTest.java


示例3: testAllTechniquesSingleton

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
@Test
public void testAllTechniquesSingleton() {
    final double[] singletonArray = new double[] { 1d };
    for (final Percentile.EstimationType e : Percentile.EstimationType.values()) {
        reset (50, e);
        final UnivariateStatistic percentile = getUnivariateStatistic();
        Assert.assertEquals(1d, percentile.evaluate(singletonArray), 0);
        Assert.assertEquals(1d, percentile.evaluate(singletonArray, 0, 1),
                0);
        Assert.assertEquals(1d,
                new Percentile().evaluate(singletonArray, 0, 1, 5), 0);
        Assert.assertEquals(1d,
                new Percentile().evaluate(singletonArray, 0, 1, 100), 0);
        Assert.assertTrue(Double.isNaN(percentile.evaluate(singletonArray,
                0, 0)));
    }
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:18,代码来源:PercentileTest.java


示例4: testAllTechniquesEmpty

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
@Test
public void testAllTechniquesEmpty() {
    final double[] singletonArray = new double[] { };
    for (final Percentile.EstimationType e : Percentile.EstimationType.values()) {
        reset (50, e);
        final UnivariateStatistic percentile = getUnivariateStatistic();
        Assert.assertEquals(Double.NaN, percentile.evaluate(singletonArray),
                0);
        Assert.assertEquals(Double.NaN, percentile.evaluate(singletonArray,
                0, 0),
                0);
        Assert.assertEquals(Double.NaN,
                new Percentile().evaluate(singletonArray, 0, 0, 5), 0);
        Assert.assertEquals(Double.NaN,
                new Percentile().evaluate(singletonArray, 0, 0, 100), 0);
        Assert.assertTrue(Double.isNaN(percentile.evaluate(singletonArray,
                0, 0)));
    }
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:20,代码来源:PercentileTest.java


示例5: Analyzer

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * Constructs a new analyzer initialized with default settings.
 */
public Analyzer() {
	super();
	
	significanceLevel = 0.05;
	statistics = new ArrayList<UnivariateStatistic>();
	data = new HashMap<String, List<NondominatedPopulation>>();
}
 
开发者ID:Matsemann,项目名称:eamaster,代码行数:11,代码来源:Analyzer.java


示例6: apply

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * Apply the given statistic to this univariate collection.
 * @param stat the statistic to apply
 * @return the computed value of the statistic.
 */
@Override
public double apply(UnivariateStatistic stat) {
    double[] v = this.getValues();

    if (v != null) {
        return stat.evaluate(v, 0, v.length);
    }
    return Double.NaN;
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:15,代码来源:ListUnivariateImpl.java


示例7: testAllTechniques5

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
@Test
public void testAllTechniques5() {
    reset(5, Percentile.EstimationType.LEGACY);
    final UnivariateStatistic percentile = getUnivariateStatistic();
    Assert.assertEquals(this.percentile5, percentile.evaluate(testArray),
            getTolerance());
    testAssertMappedValues(testArray,
            new Object[][] { { Percentile.EstimationType.LEGACY, percentile5 }, { Percentile.EstimationType.R_1, 8.8000 },
                    { Percentile.EstimationType.R_2, 8.8000 }, { Percentile.EstimationType.R_3, 8.2000 }, { Percentile.EstimationType.R_4, 8.2600 },
                    { Percentile.EstimationType.R_5, 8.5600 }, { Percentile.EstimationType.R_6, 8.2900 },
                    { Percentile.EstimationType.R_7, 8.8100 }, { Percentile.EstimationType.R_8, 8.4700 },
                    { Percentile.EstimationType.R_9, 8.4925 }}, 5d, getTolerance());
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:14,代码来源:PercentileTest.java


示例8: Statistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
Statistic(UnivariateStatistic statistic){
    this.statistic = statistic;
}
 
开发者ID:FutureCitiesCatapult,项目名称:TomboloDigitalConnector,代码行数:4,代码来源:DescriptiveStatisticsField.java


示例9: getStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
protected UnivariateStatistic getStatistic(){
    return statistic;
}
 
开发者ID:FutureCitiesCatapult,项目名称:TomboloDigitalConnector,代码行数:4,代码来源:DescriptiveStatisticsField.java


示例10: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * @see org.apache.commons.math3.stat.descriptive.UnivariateStatisticAbstractTest#getUnivariateStatistic()
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new FirstMoment();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:FirstMomentTest.java


示例11: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new StandardDeviation();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:StandardDeviationTest.java


示例12: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * @see org.apache.commons.math3.stat.descriptive.UnivariateStatisticAbstractTest#getUnivariateStatistic()
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new SecondMoment();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:SecondMomentTest.java


示例13: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new Variance();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:VarianceTest.java


示例14: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * @see org.apache.commons.math3.stat.descriptive.UnivariateStatisticAbstractTest#getUnivariateStatistic()
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new FourthMoment();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:FourthMomentTest.java


示例15: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new Skewness();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:SkewnessTest.java


示例16: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new GeometricMean();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:GeometricMeanTest.java


示例17: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * @see org.apache.commons.math3.stat.descriptive.UnivariateStatisticAbstractTest#getUnivariateStatistic()
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new ThirdMoment();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:ThirdMomentTest.java


示例18: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new Mean();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:MeanTest.java


示例19: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new Kurtosis();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:KurtosisTest.java


示例20: getUnivariateStatistic

import org.apache.commons.math3.stat.descriptive.UnivariateStatistic; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public UnivariateStatistic getUnivariateStatistic() {
    return new Max();
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:8,代码来源:MaxTest.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java DiagramEditPart类代码示例发布时间:2022-05-22
下一篇:
Java RoleChangeTask类代码示例发布时间: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