本文整理匯總了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);
}