Package pal.treesearch
Class UnrootedMLSearcher
java.lang.Object
pal.treesearch.UnrootedMLSearcher
- All Implemented Interfaces:
Markable
,StateProvider
,UnrootedTreeInterface.Instructee
public class UnrootedMLSearcher
extends Object
implements Markable, StateProvider, UnrootedTreeInterface.Instructee
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionUnrootedMLSearcher
(Alignment alignment, SubstitutionModel model) Build an unconstrained optimiser based on a randomly generated tree.UnrootedMLSearcher
(Alignment alignment, SubstitutionModel model, LHCalculator.Factory calcFactory) UnrootedMLSearcher
(Node root) Create a searcher based on a given tree, that has no alignment , or model, specified (useful as backbone tree for attaching new nodes)UnrootedMLSearcher
(Node root, Alignment alignment, SubstitutionModel model) UnrootedMLSearcher
(Node root, Alignment alignment, SubstitutionModel model, LHCalculator.Factory calcFactory) UnrootedMLSearcher
(Node root, SubstitutionModel model) Create a searcher based on a given tree, that has no alignment specified (useful as backbone tree for attaching new nodes)UnrootedMLSearcher
(Tree t, Alignment alignment, SubstitutionModel model) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Likelihood calculation method (not optimisation)double
An alternative likelihood calculation method (should give same results as other method, and in same time)getBranchLengthWithModelOptimiseAction
(StoppingCriteria.Factory stopper, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits) getModelOptimiseAction
(MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits) getModelOptimiseAction
(MultivariateMinimum minimiser, MinimiserMonitor monitor, int fxFracDigits, int xFracDigits) getNNIAction
(StoppingCriteria.Factory stopper) final Assessor
getSPRAction
(StoppingCriteria.Factory stopper) void
instruct
(UnrootedTreeInterface treeInterface) final void
mark()
void
restoreState
(Object stateReference) double
simpleOptimiseLikelihood
(double epsilon, AlgorithmCallback callback) Optimise the branch lengths of the tree to obtain the maximum likelihood.double
simpleOptimiseLikelihood
(StoppingCriteria stopper, AlgorithmCallback callback) Optimise the branch lengths of the tree to obtain the maximum likelihood.void
final void
-
Constructor Details
-
UnrootedMLSearcher
Build an unconstrained optimiser based on a randomly generated tree.- Parameters:
alignment
- the alignment used to represent each OTUmodel
- the substitution model that is used for calcuation. If optimisation on the model occurs than this model will be altered
-
UnrootedMLSearcher
public UnrootedMLSearcher(Alignment alignment, SubstitutionModel model, LHCalculator.Factory calcFactory) -
UnrootedMLSearcher
-
UnrootedMLSearcher
-
UnrootedMLSearcher
Create a searcher based on a given tree, that has no alignment specified (useful as backbone tree for attaching new nodes)- Parameters:
root
- the root of the tree to base things on (doesn't matter if it's rooted)model
- the substitution model to be used
-
UnrootedMLSearcher
Create a searcher based on a given tree, that has no alignment , or model, specified (useful as backbone tree for attaching new nodes)- Parameters:
root
- the root of the tree to base things on (doesn't matter if it's rooted)
-
UnrootedMLSearcher
public UnrootedMLSearcher(Node root, Alignment alignment, SubstitutionModel model, LHCalculator.Factory calcFactory)
-
-
Method Details
-
getAccessToBranches
-
getAccessToNodes
-
getStateReference
- Specified by:
getStateReference
in interfaceStateProvider
-
restoreState
- Specified by:
restoreState
in interfaceStateProvider
-
instruct
- Specified by:
instruct
in interfaceUnrootedTreeInterface.Instructee
-
getNNIAction
-
getBranchLengthOptimiseAction
-
getNNIBranchLengthOptimiseAction
- Parameters:
stopper
- The means for determining when a set of round should be stopped- Returns:
- An undoable action that does the Simulataneous NNI/Branch length of Stephan Guindon
-
getBranchLengthWithModelOptimiseAction
public UndoableAction getBranchLengthWithModelOptimiseAction(StoppingCriteria.Factory stopper, MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits) -
getModelOptimiseAction
public UndoableAction getModelOptimiseAction(MultivariateMinimum minimiser, int fxFracDigits, int xFracDigits) -
getModelOptimiseAction
public UndoableAction getModelOptimiseAction(MultivariateMinimum minimiser, MinimiserMonitor monitor, int fxFracDigits, int xFracDigits) -
getSPRAction
-
getSweepSPRAction
-
getFullSweepSPRAction
-
mark
public final void mark() -
undoToMark
public final void undoToMark()- Specified by:
undoToMark
in interfaceMarkable
-
testLiklihood
public void testLiklihood() -
calculateLogLikelihood
public double calculateLogLikelihood()Likelihood calculation method (not optimisation)- Returns:
- the log likelihood, based on current model, branchlengths and topology
-
calculateLogLikelihood2
public double calculateLogLikelihood2()An alternative likelihood calculation method (should give same results as other method, and in same time)- Returns:
- the log likelihood, based on current model, branchlengths and topology
-
calculateSiteDetails
-
simpleOptimiseLikelihood
Optimise the branch lengths of the tree to obtain the maximum likelihood. Does not change the model or the topology- Parameters:
epsilon
- the tolerance places for convergence (on the likelihood score)callback
- a callback to monitor progress- Returns:
- the resulting likelihood
-
simpleOptimiseLikelihood
Optimise the branch lengths of the tree to obtain the maximum likelihood. Does not change the model or the topology- Parameters:
stopper
- the stopping criteria (on the likelihood score)callback
- a callback to monitor progress- Returns:
- the resulting likelihood
-
buildPALTree
-
buildPALNode
-
getSimpleAssessor
-