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


Java DistributionLikelihood.getDataList方法代码示例

本文整理汇总了Java中dr.inference.distribution.DistributionLikelihood.getDataList方法的典型用法代码示例。如果您正苦于以下问题:Java DistributionLikelihood.getDataList方法的具体用法?Java DistributionLikelihood.getDataList怎么用?Java DistributionLikelihood.getDataList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dr.inference.distribution.DistributionLikelihood的用法示例。


在下文中一共展示了DistributionLikelihood.getDataList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: NormalNormalMeanGibbsOperator

import dr.inference.distribution.DistributionLikelihood; //导入方法依赖的package包/类
public NormalNormalMeanGibbsOperator(DistributionLikelihood inLikelihood, Distribution prior,
                                     double weight) {

    if (!(prior instanceof NormalDistribution || prior instanceof NormalDistributionModel))
        throw new RuntimeException("Mean prior must be Normal");

    this.likelihood = inLikelihood.getDistribution();
    this.dataList = inLikelihood.getDataList();
    if (likelihood instanceof NormalDistributionModel)
        this.meanParameter = (Parameter) ((NormalDistributionModel) likelihood).getMean();
    else if (likelihood instanceof LogNormalDistributionModel) {
        if (((LogNormalDistributionModel) likelihood).getParameterization() == LogNormalDistributionModel.Parameterization.MEAN_STDEV) {
            this.meanParameter = ((LogNormalDistributionModel) likelihood).getMeanParameter();
        } else {
            this.meanParameter = ((LogNormalDistributionModel) likelihood).getMuParameter();
        }
        isLog = true;
    } else
        throw new RuntimeException("Likelihood must be Normal or log Normal");

    this.prior = prior;
    setWeight(weight);
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:24,代码来源:NormalNormalMeanGibbsOperator.java

示例2: NormalGammaPrecisionGibbsOperator

import dr.inference.distribution.DistributionLikelihood; //导入方法依赖的package包/类
public NormalGammaPrecisionGibbsOperator(DistributionLikelihood inLikelihood, Distribution prior,
                                         double weight) {

    if (!(prior instanceof GammaDistribution || prior instanceof GammaDistributionModel))
        throw new RuntimeException("Precision prior must be Gamma");

    Distribution likelihood = inLikelihood.getDistribution();
    this.dataList = inLikelihood.getDataList();
    if (likelihood instanceof NormalDistributionModel) {
        this.precisionParameter = (Parameter) ((NormalDistributionModel) likelihood).getPrecision();
        this.meanParameter = (Parameter) ((NormalDistributionModel) likelihood).getMean();
    } else if (likelihood instanceof LogNormalDistributionModel) {
        this.precisionParameter = ((LogNormalDistributionModel) likelihood).getPrecisionParameter();
        this.meanParameter = ((LogNormalDistributionModel) likelihood).getMeanParameter();
        isLog = true;
    } else
        throw new RuntimeException("Likelihood must be Normal or log Normal");

    if (precisionParameter == null)
        throw new RuntimeException("Must characterize likelihood in terms of a precision parameter");

    this.prior = prior;
    setWeight(weight);
}
 
开发者ID:whdc,项目名称:ieo-beast,代码行数:25,代码来源:NormalGammaPrecisionGibbsOperator.java

示例3: NormalNormalMeanGibbsOperator

import dr.inference.distribution.DistributionLikelihood; //导入方法依赖的package包/类
public NormalNormalMeanGibbsOperator(DistributionLikelihood inLikelihood, Distribution prior,
                                     double weight) {

    if (!(prior instanceof NormalDistribution || prior instanceof NormalDistributionModel))
        throw new RuntimeException("Mean prior must be Normal");

    this.likelihood = inLikelihood.getDistribution();
    this.dataList = inLikelihood.getDataList();
    if (likelihood instanceof NormalDistributionModel)
        this.meanParameter = (Parameter) ((NormalDistributionModel) likelihood).getMean();
    else if (likelihood instanceof LogNormalDistributionModel) {
        this.meanParameter = ((LogNormalDistributionModel) likelihood).getMeanParameter();
        isLog = true;
    } else
        throw new RuntimeException("Likelihood must be Normal or log Normal");

    this.prior = prior;
    setWeight(weight);
}
 
开发者ID:whdc,项目名称:ieo-beast,代码行数:20,代码来源:NormalNormalMeanGibbsOperator.java

示例4: TruncatedDistributionLikelihood

import dr.inference.distribution.DistributionLikelihood; //导入方法依赖的package包/类
public TruncatedDistributionLikelihood(DistributionLikelihood distribution, Parameter low, Parameter high){
        super(distribution.getDistribution());
        this.dataList = (ArrayList<Attribute<double[]>>) distribution.getDataList();
//        for(Attribute<double[]> data : list){
//            System.out.println("here");
//            this.addData(data);
//        }
        this.low = low;
        this.high = high;
    }
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:11,代码来源:TruncatedDistributionLikelihood.java

示例5: NormalGammaPrecisionGibbsOperator

import dr.inference.distribution.DistributionLikelihood; //导入方法依赖的package包/类
public NormalGammaPrecisionGibbsOperator(DistributionLikelihood inLikelihood, Distribution prior,
                                         double weight) {

    if (!(prior instanceof GammaDistribution || prior instanceof GammaDistributionModel))
        throw new RuntimeException("Precision prior must be Gamma");

    Distribution likelihood = inLikelihood.getDistribution();
    this.dataList = inLikelihood.getDataList();

    if (likelihood instanceof NormalDistributionModel) {
        this.precisionParameter = (Parameter) ((NormalDistributionModel) likelihood).getPrecision();
        this.meanParameter = (Parameter) ((NormalDistributionModel) likelihood).getMean();
    } else if (likelihood instanceof LogNormalDistributionModel) {
        if (((LogNormalDistributionModel) likelihood).getParameterization() == LogNormalDistributionModel.Parameterization.MU_PRECISION) {
            this.meanParameter = ((LogNormalDistributionModel) likelihood).getMuParameter();
        } else {
            throw new RuntimeException("Must characterize likelihood in terms of mu and precision parameters");
        }
        this.precisionParameter = ((LogNormalDistributionModel) likelihood).getPrecisionParameter();
        isLog = true;
    } else
        throw new RuntimeException("Likelihood must be Normal or log Normal");

    if (precisionParameter == null)
        throw new RuntimeException("Must characterize likelihood in terms of a precision parameter");

    this.prior = prior;
    setWeight(weight);
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:30,代码来源:NormalGammaPrecisionGibbsOperator.java


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