Search in sources :

Example 1 with IndianBuffetProcessPrior

use of dr.inference.model.IndianBuffetProcessPrior in project beast-mcmc by beast-dev.

the class IndianBuffetProcessPriorParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Parameter alpha = (Parameter) xo.getChild(ALPHA).getChild(0);
    AdaptableSizeFastMatrixParameter data = (AdaptableSizeFastMatrixParameter) xo.getChild(DATA).getChild(0);
    Parameter beta;
    if (xo.hasChildNamed(BETA)) {
        beta = (Parameter) xo.getChild(BETA).getChild(0);
    } else {
        beta = new Parameter.Default(1);
    }
    return new IndianBuffetProcessPrior(alpha, beta, data);
}
Also used : IndianBuffetProcessPrior(dr.inference.model.IndianBuffetProcessPrior) AdaptableSizeFastMatrixParameter(dr.inference.model.AdaptableSizeFastMatrixParameter) Parameter(dr.inference.model.Parameter) AdaptableSizeFastMatrixParameter(dr.inference.model.AdaptableSizeFastMatrixParameter) MatrixParameter(dr.inference.model.MatrixParameter)

Aggregations

AdaptableSizeFastMatrixParameter (dr.inference.model.AdaptableSizeFastMatrixParameter)1 IndianBuffetProcessPrior (dr.inference.model.IndianBuffetProcessPrior)1 MatrixParameter (dr.inference.model.MatrixParameter)1 Parameter (dr.inference.model.Parameter)1