Search in sources :

Example 1 with LoadingsHamiltonianMC

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);
}
Also used : MatrixParameter(dr.inference.model.MatrixParameter) LoadingsHamiltonianMC(dr.inference.operators.hmc.deprecated.LoadingsHamiltonianMC) LatentFactorModel(dr.inference.model.LatentFactorModel) MomentDistributionModel(dr.inference.distribution.MomentDistributionModel) CoercionMode(dr.inference.operators.CoercionMode)

Aggregations

MomentDistributionModel (dr.inference.distribution.MomentDistributionModel)1 LatentFactorModel (dr.inference.model.LatentFactorModel)1 MatrixParameter (dr.inference.model.MatrixParameter)1 CoercionMode (dr.inference.operators.CoercionMode)1 LoadingsHamiltonianMC (dr.inference.operators.hmc.deprecated.LoadingsHamiltonianMC)1