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

Java ParametricDistribution类代码示例

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

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



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

示例1: paintComponent

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
@Override
public void paintComponent(java.awt.Graphics g) {

    Graphics2D g2d = (Graphics2D)g;
    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

    // Record current font, since drawError can take over part-way
    // through the call to drawGraph, which alters the graphics font size.
    Font originalFont = g.getFont();

    ParametricDistribution m_distr = (ParametricDistribution)m_input.get();
    if (m_distr == null) {
        drawError(g);
    } else {
        try {
            m_distr.initAndValidate();
            drawGraph(m_distr, 50, g);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            ex.printStackTrace();
            g.setFont(originalFont);
            drawError(g);
        }
    }

}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:27,代码来源:ParametricDistributionInputEditor.java


示例2: getSamples

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public QuietRealParameter[] getSamples(ParametricDistribution distr) throws Exception{
    QuietRealParameter[] samples = new QuietRealParameter[sampleSize];
    Double[][] sampleVals = distr.sample(sampleSize);
    for(int i = 0; i < samples.length;i++){
        samples[i] = new QuietRealParameter(sampleVals[i]);
    }
    return samples;
}
 
开发者ID:jessiewu,项目名称:substBMA,代码行数:9,代码来源:DirichletProcessPriorGibbsSampler.java


示例3: initAndValidate

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public void initAndValidate(){
    dp = dpInput.get();
    List<ParametricDistribution> distrs = dp.getBaseDistributions();
    paramBaseDistr = distrs.get(0);
    modelBaseDistr = distrs.get(1);
    freqsBaseDistr = distrs.get(2);
    ratesBaseDistr = distrs.get(3);

    sampleSize = sampleSizeInput.get();
    dpVal = dpValuableInput.get();
    dpTreeLikelihood = dpTreeLikelihoodInput.get();

}
 
开发者ID:jessiewu,项目名称:substBMA,代码行数:14,代码来源:NtdBMARateDPPGibbsSampler.java


示例4: getSamples

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public QuietRealParameter[] getSamples(ParametricDistribution distr, RealParameter example) throws Exception{
    QuietRealParameter[] samples = new QuietRealParameter[sampleSize];
    Double[][] sampleVals = distr.sample(sampleSize);
    for(int i = 0; i < samples.length;i++){
        samples[i] = new QuietRealParameter(sampleVals[i]);
        samples[i].setUpper(example.getUpper());
        samples[i].setLower(example.getLower());
    }
    return samples;
}
 
开发者ID:jessiewu,项目名称:substBMA,代码行数:11,代码来源:NtdBMARateDPPGibbsSampler.java


示例5: initAndValidate

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public void initAndValidate(){
    paramList = paramListInput.get();
    modelList = modelListInput.get();
    freqsList = freqsListInput.get();

    paramPointers = paramPointersInput.get();
    modelPointers = modelPointersInput.get();
    freqsPointers = freqsPointersInput.get();

    pointerCount = paramPointers.getDimension();



    dp = dpInput.get();
    List<ParametricDistribution> distrs = dp.getBaseDistributions();
    paramBaseDistr = distrs.get(0);
    modelBaseDistr = distrs.get(1);
    freqsBaseDistr = distrs.get(2);
    tempLikelihood = tempLikelihoodInput.get();
    dpTreeLikelihood = dpTreeLikelihoodInput.get();

    modelNetworkMap.put(1.0,new double[]{3.0});
    modelNetworkMap.put(2.0,new double[]{3.0});
    modelNetworkMap.put(3.0,new double[]{1.0,2.0,4.0});
    modelNetworkMap.put(4.0,new double[]{3.0,5.0});
    modelNetworkMap.put(5.0,new double[]{4.0});
    //System.out.println("is null? "+(modelNetworkMap.get(5.0) == null));

}
 
开发者ID:jessiewu,项目名称:substBMA,代码行数:30,代码来源:NtdBMASAMSTempOperator.java


示例6: initAndValidate

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public void initAndValidate(){
    testCorrect = testCorrectInput.get();
    paramList = paramListInput.get();
    modelList = modelListInput.get();
    freqsList = freqsListInput.get();

    paramPointers = paramPointersInput.get();
    modelPointers = modelPointersInput.get();
    freqsPointers = freqsPointersInput.get();

    pointerCount = paramPointers.getDimension();



    dp = dpInput.get();
    List<ParametricDistribution> distrs = dp.getBaseDistributions();
    paramBaseDistr = distrs.get(0);
    modelBaseDistr = distrs.get(1);
    freqsBaseDistr = distrs.get(2);
    tempLikelihood = tempLikelihoodInput.get();
    dpTreeLikelihood = dpTreeLikelihoodInput.get();

    modelNetworkMap.put(1.0,new double[]{3.0});
    modelNetworkMap.put(2.0,new double[]{3.0});
    modelNetworkMap.put(3.0,new double[]{1.0,2.0,4.0});
    modelNetworkMap.put(4.0,new double[]{3.0,5.0});
    modelNetworkMap.put(5.0,new double[]{4.0});
    //System.out.println("is null? "+(modelNetworkMap.get(5.0) == null));

}
 
开发者ID:jessiewu,项目名称:substBMA,代码行数:31,代码来源:NtdBMASAMSPriorOperator.java


示例7: initAndValidate

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public void initAndValidate(){
    paramList = paramListInput.get();
    modelList = modelListInput.get();
    freqsList = freqsListInput.get();
    ratesList = ratesListInput.get();

    paramPointers = paramPointersInput.get();
    modelPointers = modelPointersInput.get();
    freqsPointers = freqsPointersInput.get();
    ratesPointers = ratesPointersInput.get();

    pointerCount = paramPointers.getDimension();



    dp = dpInput.get();
    List<ParametricDistribution> distrs = dp.getBaseDistributions();
    paramBaseDistr = distrs.get(0);
    modelBaseDistr = distrs.get(1);
    freqsBaseDistr = distrs.get(2);
    ratesBaseDistr = distrs.get(3);
    tempLikelihood = tempLikelihoodInput.get();
    dpTreeLikelihood = dpTreeLikelihoodInput.get();

    modelNetworkMap.put(1.0,new double[]{3.0});
    modelNetworkMap.put(2.0,new double[]{3.0});
    modelNetworkMap.put(3.0,new double[]{1.0,2.0,4.0});
    modelNetworkMap.put(4.0,new double[]{3.0,5.0});
    modelNetworkMap.put(5.0,new double[]{4.0});
    //System.out.println("is null? "+(modelNetworkMap.get(5.0) == null));

}
 
开发者ID:jessiewu,项目名称:substBMA,代码行数:33,代码来源:NtdBMARateSAMSPriorOperator.java


示例8: initAndValidate

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public void initAndValidate(){
    testCorrect = testCorrectInput.get();
    dp = dpInput.get();
    List<ParametricDistribution> distrs = dp.getBaseDistributions();
    paramBaseDistr = distrs.get(0);
    modelBaseDistr = distrs.get(1);
    freqsBaseDistr = distrs.get(2);
    
    sampleSize = sampleSizeInput.get();
    dpVal = dpValuableInput.get();
    dpTreeLikelihood = dpTreeLikelihoodInput.get();

}
 
开发者ID:jessiewu,项目名称:substBMA,代码行数:14,代码来源:NtdBMADPPGibbsSampler.java


示例9: dist

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public ParametricDistribution dist() {
  return pd;
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:4,代码来源:CalibrationPoint.java


示例10: type

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
@Override
public Class<?> type() {
    //return ParametricDistributionInputEditor.class;
    return ParametricDistribution.class;
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:6,代码来源:ParametricDistributionInputEditor.java


示例11: getDensityForPlot

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
/**
 * Returns the density of pDistr at x when pDistr is a density of a
 * continuous variable, but returns the probability of the closest
 * integer when pDistr is a probability distribution over an integer-valued
 * parameter.
 * 
 * @param pDistr
 * @param x
 * @return density at x or probability of closest integer to x
 */
private double getDensityForPlot(ParametricDistribution pDistr, double x) {
    if (pDistr.isIntegerDistribution()) {
        return pDistr.density((int) Math.round(x));
    } else {
        return pDistr.density(x);
    }
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:18,代码来源:ParametricDistributionInputEditor.java


示例12: getSample

import beast.math.distributions.ParametricDistribution; //导入依赖的package包/类
public QuietRealParameter getSample(ParametricDistribution distr, double upper, double lower) throws Exception{

        Double[][] sampleVals = distr.sample(1);

        QuietRealParameter sampleParameter = new QuietRealParameter(sampleVals[0]);
        sampleParameter.setUpper(upper);
        sampleParameter.setLower(lower);

        return sampleParameter;
    }
 
开发者ID:jessiewu,项目名称:substBMA,代码行数:11,代码来源:NtdBMASAMSTempOperator.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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