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


Java Gamma类代码示例

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


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

示例1: testGamma

import org.apache.mahout.math.jet.random.Gamma; //导入依赖的package包/类
@Test
    public void testGamma() {
        // this Gamma distribution is very heavily skewed.  The 0.1%-ile is 6.07e-30 while
        // the median is 0.006 and the 99.9th %-ile is 33.6 while the mean is 1.
        // this severe skew means that we have to have positional accuracy that
        // varies by over 11 orders of magnitude.
        Random gen = RandomUtils.getRandom();
        for (int i = 0; i < repeats(); i++) {
            runTest(new Gamma(0.1, 0.1, gen), 100,
//                    new double[]{6.0730483624079e-30, 6.0730483624079e-20, 6.0730483627432e-10, 5.9339110446023e-03,
//                            2.6615455373884e+00, 1.5884778179295e+01, 3.3636770117188e+01},
                    new double[]{0.001, 0.01, 0.1, 0.5, 0.9, 0.99, 0.999},
                    "gamma", true, gen);
        }
    }
 
开发者ID:mayconbordin,项目名称:streaminer,代码行数:16,代码来源:TDigestTest.java

示例2: compareToQDigest

import org.apache.mahout.math.jet.random.Gamma; //导入依赖的package包/类
@Test
public void compareToQDigest() {
    Random rand = RandomUtils.getRandom();

    for (int i = 0; i < repeats(); i++) {
        compare(new Gamma(0.1, 0.1, rand), "gamma", 1L << 48, rand);
        compare(new Uniform(0, 1, rand), "uniform", 1L << 48, rand);
    }
}
 
开发者ID:mayconbordin,项目名称:streaminer,代码行数:10,代码来源:TDigestTest.java

示例3: testGamma

import org.apache.mahout.math.jet.random.Gamma; //导入依赖的package包/类
@Test
    public void testGamma() {
        // this Gamma distribution is very heavily skewed.  The 0.1%-ile is 6.07e-30 while
        // the median is 0.006 and the 99.9th %-ile is 33.6 while the mean is 1.
        // this severe skew means that we have to have positional accuracy that
        // varies by over 11 orders of magnitude.
        Random gen = getRandom();
        for (int i = 0; i < repeats(); i++) {
            runTest(factory(), new Gamma(0.1, 0.1, gen), 100,
//                    new double[]{6.0730483624079e-30, 6.0730483624079e-20, 6.0730483627432e-10, 5.9339110446023e-03,
//                            2.6615455373884e+00, 1.5884778179295e+01, 3.3636770117188e+01},
                    new double[]{0.001, 0.01, 0.1, 0.5, 0.9, 0.99, 0.999},
                    "gamma", true);
        }
    }
 
开发者ID:tdunning,项目名称:t-digest,代码行数:16,代码来源:TDigestTest.java

示例4: compareToQDigest

import org.apache.mahout.math.jet.random.Gamma; //导入依赖的package包/类
@Test
public void compareToQDigest() throws FileNotFoundException {
    Random rand = getRandom();
    try (PrintWriter out = new PrintWriter(new FileOutputStream("qd-tree-comparison.csv"))) {
        for (int i = 0; i < repeats(); i++) {
            compareQD(out, new Gamma(0.1, 0.1, rand), "gamma", 1L << 48);
            compareQD(out, new Uniform(0, 1, rand), "uniform", 1L << 48);
        }
    }
}
 
开发者ID:tdunning,项目名称:t-digest,代码行数:11,代码来源:TDigestTest.java

示例5: compareToStreamingQuantile

import org.apache.mahout.math.jet.random.Gamma; //导入依赖的package包/类
@Test
public void compareToStreamingQuantile() throws FileNotFoundException {
    Random rand = getRandom();

    try (PrintWriter out = new PrintWriter(new FileOutputStream("sq-tree-comparison.csv"))) {
        for (int i = 0; i < repeats(); i++) {
            compareSQ(out, new Gamma(0.1, 0.1, rand), "gamma", 1L << 48);
            compareSQ(out, new Uniform(0, 1, rand), "uniform", 1L << 48);
        }
    }
}
 
开发者ID:tdunning,项目名称:t-digest,代码行数:12,代码来源:TDigestTest.java

示例6: Changer

import org.apache.mahout.math.jet.random.Gamma; //导入依赖的package包/类
public Changer(@JsonProperty("values") List<FieldSampler> fields) {
    this.fields = fields;
    fieldNames = Lists.newArrayList();
    for (FieldSampler field : fields) {
        fieldNames.add(field.getName());
    }
    x = new Gamma(1, 1, gen);
    y = new Gamma(3, 1, gen);
}
 
开发者ID:tdunning,项目名称:log-synth,代码行数:10,代码来源:Changer.java

示例7: create

import org.apache.mahout.math.jet.random.Gamma; //导入依赖的package包/类
@Override
public AbstractContinousDistribution create(Random gen) {
    return new Gamma(0.1, 0.1, gen);
}
 
开发者ID:tdunning,项目名称:t-digest,代码行数:5,代码来源:Util.java


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