Package pal.eval
Class LikelihoodOptimiser
- java.lang.Object
-
- pal.eval.LikelihoodOptimiser
-
public class LikelihoodOptimiser extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description LikelihoodOptimiser(Tree tree, Alignment alignment, SubstitutionModel model)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
optimiseAlternate(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits)
Optimise parameters to acheive maximum likelihood using an alternating stategy.static double
optimiseAlternate(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
Optimise parameters to acheive maximum likelihood using an alternating stategy.static double
optimiseCombined(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits)
Optimise parameters to acheive maximum likelihood using a combined stategy.static double
optimiseCombined(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
Optimise parameters to acheive maximum likelihood using a combined stategy.double
optimiseLogLikelihood(Parameterized parameters, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits)
double
optimiseLogLikelihood(Parameterized parameters, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
static double
optimiseModel(Tree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
Optimise model parameters only to acheive maximum likelihood using a combined stategy.static double
optimiseTree(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits)
Optimise tree branchlengths only to acheive maximum likelihood using a combined stategy.static double
optimiseTree(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
Optimise tree branchlengths only to acheive maximum likelihood using a combined stategy.
-
-
-
Constructor Detail
-
LikelihoodOptimiser
public LikelihoodOptimiser(Tree tree, Alignment alignment, SubstitutionModel model)
-
-
Method Detail
-
optimiseLogLikelihood
public double optimiseLogLikelihood(Parameterized parameters, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
-
optimiseLogLikelihood
public double optimiseLogLikelihood(Parameterized parameters, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits)
-
optimiseCombined
public static final double optimiseCombined(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
Optimise parameters to acheive maximum likelihood using a combined stategy. That is, model and tree are optimised concurrently.- Parameters:
tree
- The tree to be optimised (will be altered by optimisation)alignment
- The alignment related to treemodel
- The substitution model to be optimised (will be altered by optimisation)fxFracDigits
- The number of decimal placess to stabilise to in the log likelihoodxFracDigits
- The number of decimal placess to stabilise to in the model/tree parametersminimiser
- The MultivariateMinimum object that is used for minimisingmonitor
- A minimiser monitor to monitor progress- Returns:
- The maximal log likelihood found
-
optimiseCombined
public static final double optimiseCombined(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits)
Optimise parameters to acheive maximum likelihood using a combined stategy. That is, model and tree are optimised concurrently.- Parameters:
tree
- The tree to be optimised (will be altered by optimisation)alignment
- The alignment related to treemodel
- The substitution model to be optimised (will be altered by optimisation)fxFracDigits
- The number of decimal placess to stabilise to in the log likelihoodxFracDigits
- The number of decimal placess to stabilise to in the model/tree parametersminimiser
- The MultivariateMinimum object that is used for minimising- Returns:
- The maximal log likelihood found
-
optimiseAlternate
public static final double optimiseAlternate(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits)
Optimise parameters to acheive maximum likelihood using an alternating stategy. That is first the model is optimised, than the tree branch lengths, then the model, then the tree, and so on until convergence.- Parameters:
tree
- The tree to be optimised (will be altered by optimisation)alignment
- The alignment related to treemodel
- The substitution model to be optimised (will be altered by optimisation)fxFracDigits
- The number of decimal placess to stabilise to in the log likelihoodxFracDigits
- The number of decimal placess to stabilise to in the model/tree parametersminimiser
- The MultivariateMinimum object that is used for minimising- Returns:
- The maximal log likelihood found
-
optimiseAlternate
public static final double optimiseAlternate(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
Optimise parameters to acheive maximum likelihood using an alternating stategy. That is first the model is optimised, than the tree branch lengths, then the model, then the tree, and so on until convergence.- Parameters:
tree
- The tree to be optimised (will be altered by optimisation)alignment
- The alignment related to treemodel
- The substitution model to be optimised (will be altered by optimisation)fxFracDigits
- The number of decimal placess to stabilise to in the log likelihoodxFracDigits
- The number of decimal placess to stabilise to in the model/tree parametersminimiser
- The MultivariateMinimum object that is used for minimisingmonitor
- A minimiser monitor to monitor progress- Returns:
- The maximal log likelihood found
-
optimiseTree
public static final double optimiseTree(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits)
Optimise tree branchlengths only to acheive maximum likelihood using a combined stategy.- Parameters:
tree
- The tree to be optimised (will be altered by optimisation)alignment
- The alignment related to treemodel
- The substitution model to be optimised (will *not * be altered by optimisation)fxFracDigits
- The number of decimal placess to stabilise to in the log likelihoodxFracDigits
- The number of decimal placess to stabilise to in the model/tree parametersminimiser
- The MultivariateMinimum object that is used for minimising- Returns:
- The maximal log likelihood found
-
optimiseTree
public static final double optimiseTree(ParameterizedTree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
Optimise tree branchlengths only to acheive maximum likelihood using a combined stategy.- Parameters:
tree
- The tree to be optimised (will be altered by optimisation)alignment
- The alignment related to treemodel
- The substitution model to be optimised (will *not * be altered by optimisation)fxFracDigits
- The number of decimal placess to stabilise to in the log likelihoodxFracDigits
- The number of decimal placess to stabilise to in the model/tree parametersminimiser
- The MultivariateMinimum object that is used for minimisingmonitor
- A minimiser monitor to monitor progress- Returns:
- The maximal log likelihood found
-
optimiseModel
public static final double optimiseModel(Tree tree, Alignment alignment, SubstitutionModel model, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits, MinimiserMonitor monitor)
Optimise model parameters only to acheive maximum likelihood using a combined stategy.- Parameters:
tree
- The tree to be optimised (will *not* be altered by optimisation)alignment
- The alignment related to treemodel
- The substitution model to be optimised (will be altered by optimisation)fxFracDigits
- The number of decimal placess to stabilise to in the log likelihoodxFracDigits
- The number of decimal placess to stabilise to in the model/tree parametersminimiser
- The MultivariateMinimum object that is used for minimisingmonitor
- A minimiser monitor to monitor progress- Returns:
- The maximal log likelihood found
-
-