Search in sources :

Example 21 with ParametricDistributionModel

use of dr.inference.distribution.ParametricDistributionModel in project beast-mcmc by beast-dev.

the class SampleQuantileLociRatesParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final boolean normalize = xo.getAttribute(NORMALIZE, false);
    final double normalizeBranchRateTo = xo.getAttribute(NORMALIZE_MEAN_LOCI_RATE_TO, Double.NaN);
    CompoundParameter lociRates = (CompoundParameter) xo.getElementFirstChild(LOCI_RATES);
    Parameter rateQuantilesParameter = (Parameter) xo.getElementFirstChild(RATE_QUANTILES);
    ParametricDistributionModel distributionModel = (ParametricDistributionModel) xo.getElementFirstChild(DISTRIBUTION);
    Logger.getLogger("dr.evomodel").info("Using sample quantile loci rates model.");
    Logger.getLogger("dr.evomodel").info("  parametric model = " + distributionModel.getModelName());
    if (normalize) {
        Logger.getLogger("dr.evomodel").info("   mean rate is normalized to " + normalizeBranchRateTo);
    }
    return new SampleQuantileLociRates(lociRates, rateQuantilesParameter, distributionModel, normalize, normalizeBranchRateTo);
}
Also used : CompoundParameter(dr.inference.model.CompoundParameter) SampleQuantileLociRates(dr.oldevomodel.sitemodel.SampleQuantileLociRates) ParametricDistributionModel(dr.inference.distribution.ParametricDistributionModel) CompoundParameter(dr.inference.model.CompoundParameter) Parameter(dr.inference.model.Parameter)

Aggregations

ParametricDistributionModel (dr.inference.distribution.ParametricDistributionModel)21 Parameter (dr.inference.model.Parameter)16 ArrayList (java.util.ArrayList)4 TreeModel (dr.evomodel.tree.TreeModel)3 DistributionLikelihood (dr.inference.distribution.DistributionLikelihood)3 DiscretizedBranchRates (dr.evomodel.branchratemodel.DiscretizedBranchRates)2 VariableDemographicModel (dr.evomodel.coalescent.VariableDemographicModel)2 SpeciesTreeModel (dr.evomodel.speciation.SpeciesTreeModel)2 NormalDistributionModel (dr.inference.distribution.NormalDistributionModel)2 CompoundParameter (dr.inference.model.CompoundParameter)2 Statistic (dr.inference.model.Statistic)2 Attribute (dr.util.Attribute)2 SimpleTree (dr.evolution.tree.SimpleTree)1 Tree (dr.evolution.tree.Tree)1 Taxa (dr.evolution.util.Taxa)1 Taxon (dr.evolution.util.Taxon)1 TaxonList (dr.evolution.util.TaxonList)1 Units (dr.evolution.util.Units)1 AlloppNetworkPriorModel (dr.evomodel.alloppnet.speciation.AlloppNetworkPriorModel)1 BranchRateModel (dr.evomodel.branchratemodel.BranchRateModel)1