use of dr.inference.operators.FactorIndependenceOperator in project beast-mcmc by beast-dev.
the class FactorIndependenceOperatorParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
CoercionMode mode = CoercionMode.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 FactorIndependenceOperator(LFM, weight, randomScan, diffusionMatrix, scaleFactor, mode);
}
Aggregations