Package pal.tree
Class MutationRateModelTree
java.lang.Object
pal.tree.ParameterizedTree.ParameterizedTreeBase
pal.tree.MutationRateModelTree
- All Implemented Interfaces:
Serializable,OrthogonalHints,IdGroup,Parameterized,Units,UnitsProvider,ParameterizedTree,Tree
public class MutationRateModelTree
extends ParameterizedTree.ParameterizedTreeBase
implements OrthogonalHints, ParameterizedTree
Provides parameter interface to any clock-like tree with
serially sampled tips (parameters are the minimal node height differences
at each internal node). Any mutation rate model can be used.
- Version:
- $Id: MutationRateModelTree.java,v 1.19 2003/06/04 03:17:52 matt Exp $
- Author:
- Alexei Drummond
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.misc.IdGroup
IdGroup.UtilsNested classes/interfaces inherited from interface pal.math.OrthogonalHints
OrthogonalHints.UtilsNested classes/interfaces inherited from interface pal.misc.Parameterized
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.UtilsNested classes/interfaces inherited from interface pal.tree.ParameterizedTree
ParameterizedTree.Factory, ParameterizedTree.ParameterizedTreeBaseNested classes/interfaces inherited from interface pal.tree.Tree
Tree.TreeBase -
Field Summary
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCloning constructorMutationRateModelTree(Tree t, TimeOrderCharacterData tocd, MutationRateModel model) take any tree and afford it with an interface suitable for a clock-like tree (parameters are the minimal node height differences at each internal node).MutationRateModelTree(Tree t, TimeOrderCharacterData tocd, MutationRateModel model, boolean includeModelParameters) take any tree and afford it with an interface suitable for a clock-like tree (parameters are the minimal node height differences at each internal node). -
Method Summary
Modifier and TypeMethodDescriptionclone()getCopy()The cheapy copy that just creates a SimpleTreedoublegetDefaultValue(int n) get default value of parameterintgetInternalParameterBoundaries(int parameter, double[] storage) A boundary is a value of a parameter for which values lower than the boundary and values higher than the boundary are better treated as two separate functions (IE, they are only piecewise connected), and minimisation should be performed over both ranges individually (and then the true minimum taken as the minimuma of the ranges)doublegetLnL()doublegetLowerLimit(int n) Returns lower limit of parameter estimate.returns muintget number of parametersdoublegetParameter(int n) get model parameterstatic final ParameterizedTree.FactorygetParameterizedTreeFactory(MutationRateModel.Factory rateModel, TimeOrderCharacterData tocd) Obtain a ParameterizedTree.Factory for generating Unconstrained treesgetSuggestedOrdering(OrderEnumerator defaultOrdering) If there is a "best" ordering to use it can be specified here, if not should return nulldoublegetUpperLimit(int n) get upper parameter limitprotected voidprotected voidvoidsetLnL(double lnL) voidsetMaxRelativeHeight(double value) Sets the maximum distance between ancestor and latest descendant.voidsetParameter(double param, int n) set model parametervoidsetParameterSE(double paramSE, int n) set standard errors for model parameterMethods inherited from class pal.tree.ParameterizedTree.ParameterizedTreeBase
createNodeList, getAttribute, getBaseTree, getExternalNode, getExternalNodeCount, getIdCount, getIdentifier, getInternalNode, getInternalNodeCount, getNodeCount, getRoot, getUnits, setAttribute, setBaseTree, setIdentifier, setRoot, toString, whichIdNumberMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface pal.misc.IdGroup
getIdCount, getIdentifier, setIdentifier, whichIdNumberMethods inherited from interface pal.tree.Tree
createNodeList, getAttribute, getExternalNode, getExternalNodeCount, getInternalNode, getInternalNodeCount, getRoot, getUnits, setAttribute, setRoot
-
Constructor Details
-
MutationRateModelTree
take any tree and afford it with an interface suitable for a clock-like tree (parameters are the minimal node height differences at each internal node). Includes model parameters as parameters of treeThis parameterisation of a clock-tree, ensuring that all parameters are independent of each other is due to Andrew Rambaut (personal communication).
-
MutationRateModelTree
public MutationRateModelTree(Tree t, TimeOrderCharacterData tocd, MutationRateModel model, boolean includeModelParameters) take any tree and afford it with an interface suitable for a clock-like tree (parameters are the minimal node height differences at each internal node).This parameterisation of a clock-tree, ensuring that all parameters are independent of each other is due to Andrew Rambaut (personal communication).
-
MutationRateModelTree
Cloning constructor
-
-
Method Details
-
setMaxRelativeHeight
public void setMaxRelativeHeight(double value) Sets the maximum distance between ancestor and latest descendant. -
getNumParameters
public int getNumParameters()Description copied from interface:Parameterizedget number of parameters- Specified by:
getNumParametersin interfaceParameterized- Returns:
- number of parameters
-
setParameter
public void setParameter(double param, int n) Description copied from interface:Parameterizedset model parameter- Specified by:
setParameterin interfaceParameterized- Parameters:
param- parameter valuen- parameter number
-
getParameter
public double getParameter(int n) Description copied from interface:Parameterizedget model parameter- Specified by:
getParameterin interfaceParameterized- Parameters:
n- parameter number- Returns:
- parameter value
-
getLowerLimit
public double getLowerLimit(int n) Returns lower limit of parameter estimate.- Specified by:
getLowerLimitin interfaceParameterized- Parameters:
n- parameter number- Returns:
- lower bound
-
getDefaultValue
public double getDefaultValue(int n) Description copied from interface:Parameterizedget default value of parameter- Specified by:
getDefaultValuein interfaceParameterized- Parameters:
n- parameter number- Returns:
- default value
-
setParameterSE
public void setParameterSE(double paramSE, int n) Description copied from interface:Parameterizedset standard errors for model parameter- Specified by:
setParameterSEin interfaceParameterized- Parameters:
paramSE- standard error of parameter valuen- parameter number
-
getUpperLimit
public double getUpperLimit(int n) Description copied from interface:Parameterizedget upper parameter limit- Specified by:
getUpperLimitin interfaceParameterized- Parameters:
n- parameter number- Returns:
- upper bound
-
getParameterizationInfo
- Specified by:
getParameterizationInfoin interfaceParameterizedTree
-
getMutationRateModel
returns mu -
parameters2Heights
protected void parameters2Heights() -
heights2parameters
protected void heights2parameters() -
setLnL
public void setLnL(double lnL) -
getLnL
public double getLnL() -
getOrthogonalHints
- Specified by:
getOrthogonalHintsin interfaceParameterizedTree- Overrides:
getOrthogonalHintsin classParameterizedTree.ParameterizedTreeBase- Returns:
- null by default (implying not hint information)
-
getSuggestedOrdering
Description copied from interface:OrthogonalHintsIf there is a "best" ordering to use it can be specified here, if not should return null- Specified by:
getSuggestedOrderingin interfaceOrthogonalHints- Parameters:
defaultOrdering- The ordering suggested by the optimiser, may be null!- Returns:
- null, or default ordering if no known best ordering
-
getInternalParameterBoundaries
public int getInternalParameterBoundaries(int parameter, double[] storage) Description copied from interface:OrthogonalHintsA boundary is a value of a parameter for which values lower than the boundary and values higher than the boundary are better treated as two separate functions (IE, they are only piecewise connected), and minimisation should be performed over both ranges individually (and then the true minimum taken as the minimuma of the ranges)- Specified by:
getInternalParameterBoundariesin interfaceOrthogonalHints- Returns:
- the number of boundary locations stored in storage, or -1 if not enough room, or 0 if there are no boundaries (other than the normal parameter range)
-
getCopy
Description copied from class:ParameterizedTree.ParameterizedTreeBaseThe cheapy copy that just creates a SimpleTree- Specified by:
getCopyin interfaceTree- Overrides:
getCopyin classParameterizedTree.ParameterizedTreeBase- Returns:
- a clone of this tree
-
clone
-
getParameterizedTreeFactory
public static final ParameterizedTree.Factory getParameterizedTreeFactory(MutationRateModel.Factory rateModel, TimeOrderCharacterData tocd) Obtain a ParameterizedTree.Factory for generating Unconstrained trees
-