Search in sources :

Example 1 with FactorOperator

use of dr.inference.operators.factorAnalysis.FactorOperator in project beast-mcmc by beast-dev.

the class FactorOperatorParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    AdaptationMode mode = AdaptationMode.parseMode(xo);
    String scaleFactorTemp = (String) xo.getAttribute(SCALE_FACTOR);
    double scaleFactor = Double.parseDouble(scaleFactorTemp);
    String weightTemp = (String) xo.getAttribute(WEIGHT);
    double weight = Double.parseDouble(weightTemp);
    DiagonalMatrix diffusionMatrix;
    diffusionMatrix = (DiagonalMatrix) xo.getChild(DiagonalMatrix.class);
    LatentFactorModel LFM = (LatentFactorModel) xo.getChild(LatentFactorModel.class);
    boolean randomScan = xo.getAttribute(RANDOM_SCAN, true);
    return new FactorOperator(LFM, weight, randomScan, diffusionMatrix, scaleFactor, mode);
}
Also used : AdaptationMode(dr.inference.operators.AdaptationMode) DiagonalMatrix(dr.inference.model.DiagonalMatrix) FactorOperator(dr.inference.operators.factorAnalysis.FactorOperator) LatentFactorModel(dr.inference.model.LatentFactorModel)

Aggregations

DiagonalMatrix (dr.inference.model.DiagonalMatrix)1 LatentFactorModel (dr.inference.model.LatentFactorModel)1 AdaptationMode (dr.inference.operators.AdaptationMode)1 FactorOperator (dr.inference.operators.factorAnalysis.FactorOperator)1