use of dr.inference.operators.hmc.deprecated.LatentFactorHamiltonianMC in project beast-mcmc by beast-dev.
the class LatentFactorHamiltonianMCParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
LatentFactorModel lfm = (LatentFactorModel) xo.getChild(LatentFactorModel.class);
FullyConjugateMultivariateTraitLikelihood tree = (FullyConjugateMultivariateTraitLikelihood) xo.getChild(FullyConjugateMultivariateTraitLikelihood.class);
double weight = xo.getDoubleAttribute(WEIGHT);
CoercionMode mode = CoercionMode.parseMode(xo);
int nSteps = xo.getIntegerAttribute(N_STEPS);
double stepSize = xo.getDoubleAttribute(STEP_SIZE);
double momentumSd = xo.getDoubleAttribute(MOMENTUM_SD);
return new LatentFactorHamiltonianMC(lfm, tree, weight, mode, stepSize, nSteps, momentumSd);
}
Aggregations