本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}