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;
}
Aggregations