use of dr.inference.operators.hmc.deprecated.LoadingsHamiltonianMC in project beast-mcmc by beast-dev.
the class LoadingsHamiltonianMCParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
LatentFactorModel lfm = (LatentFactorModel) xo.getChild(LatentFactorModel.class);
MomentDistributionModel prior = (MomentDistributionModel) xo.getChild(MomentDistributionModel.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);
MatrixParameter loadings = (MatrixParameter) xo.getChild(MatrixParameter.class);
return new LoadingsHamiltonianMC(lfm, prior, weight, mode, stepSize, nSteps, momentumSd, loadings);
}
Aggregations