Search in sources :

Example 1 with OrnsteinUhlenbeckPriorLikelihood

use of dr.evomodel.coalescent.OrnsteinUhlenbeckPriorLikelihood in project beast-mcmc by beast-dev.

the class OrnsteinUhlenbeckPriorLikelihoodParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Parameter mean = getParam(xo, MEAN);
    Parameter sigma = getParam(xo, SIGMA);
    Parameter lambda = getParam(xo, LAMBDA);
    final boolean logSpace = xo.getAttribute(LOG_SPACE, false);
    final boolean normalize = xo.getAttribute(NORMALIZE, false);
    VariableDemographicModel m = (VariableDemographicModel) xo.getChild(VariableDemographicModel.class);
    if (m != null) {
        ParametricDistributionModel popMeanPrior = (ParametricDistributionModel) xo.getChild(ParametricDistributionModel.class);
        return new OrnsteinUhlenbeckPriorLikelihood(mean, sigma, lambda, m, logSpace, normalize, popMeanPrior);
    }
    final XMLObject cxo1 = xo.getChild(DATA);
    Parameter dataParameter = (Parameter) cxo1.getChild(Parameter.class);
    final XMLObject cxo2 = xo.getChild(TIMES);
    final Parameter timesParameter = (Parameter) cxo2.getChild(Parameter.class);
    return new OrnsteinUhlenbeckPriorLikelihood(mean, sigma, lambda, dataParameter, timesParameter, logSpace, normalize);
}
Also used : OrnsteinUhlenbeckPriorLikelihood(dr.evomodel.coalescent.OrnsteinUhlenbeckPriorLikelihood) VariableDemographicModel(dr.evomodel.coalescent.VariableDemographicModel) ParametricDistributionModel(dr.inference.distribution.ParametricDistributionModel) Parameter(dr.inference.model.Parameter)

Aggregations

OrnsteinUhlenbeckPriorLikelihood (dr.evomodel.coalescent.OrnsteinUhlenbeckPriorLikelihood)1 VariableDemographicModel (dr.evomodel.coalescent.VariableDemographicModel)1 ParametricDistributionModel (dr.inference.distribution.ParametricDistributionModel)1 Parameter (dr.inference.model.Parameter)1