Search in sources :

Example 6 with ScaleOperator

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

the class NarrowExchangeTest method getOperatorSchedule.

public OperatorSchedule getOperatorSchedule(TreeModel treeModel) {
    Parameter rootParameter = treeModel.createNodeHeightsParameter(true, false, false);
    Parameter internalHeights = treeModel.createNodeHeightsParameter(false, true, false);
    ExchangeOperator operator = new ExchangeOperator(ExchangeOperator.NARROW, treeModel, 1.0);
    ScaleOperator scaleOperator = new ScaleOperator(rootParameter, 0.75, CoercionMode.COERCION_ON, 1.0);
    UniformOperator uniformOperator = new UniformOperator(internalHeights, 1.0);
    OperatorSchedule schedule = new SimpleOperatorSchedule();
    schedule.addOperator(operator);
    schedule.addOperator(scaleOperator);
    schedule.addOperator(uniformOperator);
    return schedule;
}
Also used : SimpleOperatorSchedule(dr.inference.operators.SimpleOperatorSchedule) OperatorSchedule(dr.inference.operators.OperatorSchedule) SimpleOperatorSchedule(dr.inference.operators.SimpleOperatorSchedule) ExchangeOperator(dr.evomodel.operators.ExchangeOperator) Parameter(dr.inference.model.Parameter) UniformOperator(dr.inference.operators.UniformOperator) ScaleOperator(dr.inference.operators.ScaleOperator)

Aggregations

ScaleOperator (dr.inference.operators.ScaleOperator)6 Parameter (dr.inference.model.Parameter)5 OperatorSchedule (dr.inference.operators.OperatorSchedule)4 SimpleOperatorSchedule (dr.inference.operators.SimpleOperatorSchedule)4 DistributionLikelihood (dr.inference.distribution.DistributionLikelihood)2 MCLogger (dr.inference.loggers.MCLogger)2 MCMC (dr.inference.mcmc.MCMC)2 MCMCOperator (dr.inference.operators.MCMCOperator)2 UniformOperator (dr.inference.operators.UniformOperator)2 ConstantPopulationModel (dr.evomodel.coalescent.ConstantPopulationModel)1 ExchangeOperator (dr.evomodel.operators.ExchangeOperator)1 GibbsSubtreeSwap (dr.evomodel.operators.GibbsSubtreeSwap)1 NormalDistributionModel (dr.inference.distribution.NormalDistributionModel)1 ArrayLogFormatter (dr.inference.loggers.ArrayLogFormatter)1 TabDelimitedFormatter (dr.inference.loggers.TabDelimitedFormatter)1 MCMCOptions (dr.inference.mcmc.MCMCOptions)1 CompoundLikelihood (dr.inference.model.CompoundLikelihood)1 CompoundParameter (dr.inference.model.CompoundParameter)1 DummyLikelihood (dr.inference.model.DummyLikelihood)1 Likelihood (dr.inference.model.Likelihood)1