Search in sources :

Example 1 with ModelSpecificPseudoPriorLikelihood

use of dr.inference.distribution.ModelSpecificPseudoPriorLikelihood in project beast-mcmc by beast-dev.

the class ModelSpecificPseudoPriorLikelihoodParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    DistributionLikelihood priorLikelihood = (DistributionLikelihood) xo.getElementFirstChild(PRIOR);
    DistributionLikelihood pseudoPriorLikelihood = (DistributionLikelihood) xo.getElementFirstChild(PSEUDO_PRIOR);
    Distribution prior = priorLikelihood.getDistribution();
    Distribution pseudoPrior = pseudoPriorLikelihood.getDistribution();
    Parameter modelIndicator = (Parameter) xo.getElementFirstChild(MODEL_INDICATOR);
    int[] models = xo.getIntegerArrayAttribute(MODELS);
    Parameter selectedVariable = (Parameter) xo.getElementFirstChild(SELECTED_VARIABLE);
    ModelSpecificPseudoPriorLikelihood likelihood = new ModelSpecificPseudoPriorLikelihood(prior, pseudoPrior, modelIndicator, models);
    likelihood.addData(selectedVariable);
    return likelihood;
}
Also used : ModelSpecificPseudoPriorLikelihood(dr.inference.distribution.ModelSpecificPseudoPriorLikelihood) Distribution(dr.math.distributions.Distribution) Parameter(dr.inference.model.Parameter) DistributionLikelihood(dr.inference.distribution.DistributionLikelihood)

Aggregations

DistributionLikelihood (dr.inference.distribution.DistributionLikelihood)1 ModelSpecificPseudoPriorLikelihood (dr.inference.distribution.ModelSpecificPseudoPriorLikelihood)1 Parameter (dr.inference.model.Parameter)1 Distribution (dr.math.distributions.Distribution)1