當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。