bpp-phyl3
3.0.0
|
Optimization methods for phylogenetic inference. More...
#include <Bpp/Phyl/OptimizationTools.h>
Classes | |
class | OptimizationOptions |
Public Member Functions | |
OptimizationTools () | |
virtual | ~OptimizationTools () |
Static Public Member Functions | |
static unsigned int | optimizeNumericalParameters (std::shared_ptr< PhyloLikelihoodInterface > lik, const OptimizationOptions &optopt) |
Optimize numerical parameters (branch length, substitution model & rate distribution) of a TreeLikelihood function. More... | |
static unsigned int | optimizeNumericalParameters2 (std::shared_ptr< PhyloLikelihoodInterface > lik, const OptimizationOptions &optopt) |
Optimize numerical parameters (branch length, substitution model & rate distribution) of a TreeLikelihood function. More... | |
static unsigned int | optimizeNumericalParameters2 (std::shared_ptr< SingleProcessPhyloLikelihood > lik, const OptimizationOptions &optopt) |
static std::unique_ptr< DistanceMatrix > | estimateDistanceMatrix (DistanceEstimation &estimationMethod, const ParameterList ¶metersToIgnore, const std::string ¶m=DISTANCEMETHOD_INIT, unsigned int verbose=0) |
Estimate a distance matrix using maximum likelihood. More... | |
static std::unique_ptr< TreeTemplate< Node > > | buildDistanceTree (DistanceEstimation &estimationMethod, AgglomerativeDistanceMethodInterface &reconstructionMethod, const std::string ¶m, OptimizationOptions &optopt) |
Build a tree using a distance method. More... | |
Static Public Attributes | |
static std::string | OPTIMIZATION_GRADIENT = "gradient" |
static std::string | OPTIMIZATION_NEWTON = "newton" |
static std::string | OPTIMIZATION_BRENT = "Brent" |
static std::string | OPTIMIZATION_BFGS = "BFGS" |
static std::string | DISTANCEMETHOD_INIT = "init" |
static std::string | DISTANCEMETHOD_PAIRWISE = "pairwise" |
static std::string | DISTANCEMETHOD_ITERATIONS = "iterations" |
Optimization methods for phylogenetic inference.
This class provides optimization methods for phylogenetics. Parameters of the optimization methods are set to work with TreeLikelihood object. Some non trivial parameters are left to the user choice (tolerance, maximum number of function evaluation, output streams).
Definition at line 66 of file OptimizationTools.h.
OptimizationTools::OptimizationTools | ( | ) |
Definition at line 37 of file OptimizationTools.cpp.
|
virtual |
Definition at line 39 of file OptimizationTools.cpp.
|
static |
Build a tree using a distance method.
This method estimate a distance matrix using a DistanceEstimation object, and then builds the phylogenetic tree using a AgglomerativeDistanceMethod object. The main issue here is to estimate non-branch lengths parameters, as substitution model and rate distribution parameters. Three options are provideed here:
estimationMethod | The distance estimation object to use. |
reconstructionMethod | The tree reconstruction object to use. |
param | Method of for distance calculation |
optopt | Optimization Options |
Definition at line 656 of file OptimizationTools.cpp.
References bpp::ParameterList::addParameters(), bpp::Node::addSon(), bpp::TreeTemplateTools::buildFromPhyloTree(), bpp::PhyloTreeTools::buildFromTreeTemplate(), bpp::SubstitutionProcessInterface::clone(), bpp::DistanceEstimation::computeMatrix(), bpp::DistanceMethodInterface::computeTree(), bpp::ApplicationTools::displayResult(), bpp::ApplicationTools::displayTask(), bpp::ApplicationTools::displayTaskDone(), DISTANCEMETHOD_ITERATIONS, DISTANCEMETHOD_PAIRWISE, bpp::ParameterList::getCommonParametersWith(), bpp::DistanceEstimation::getData(), bpp::DistanceEstimation::getMatrix(), bpp::SubstitutionProcessInterface::getRateDistributionParameters(), bpp::SubstitutionProcessInterface::getRootFrequenciesParameters(), bpp::SubstitutionProcessInterface::getSubstitutionModelParameters(), bpp::DistanceEstimation::getVerbose(), bpp::DistanceEstimation::matchParametersValues(), optimizeNumericalParameters(), bpp::OptimizationTools::OptimizationOptions::parameters, bpp::DistanceEstimation::process(), bpp::DistanceEstimation::resetAdditionalParameters(), bpp::TreeTools::robinsonFouldsDistance(), bpp::DistanceEstimation::setAdditionalParameters(), bpp::DistanceMethodInterface::setDistanceMatrix(), bpp::Node::setDistanceToFather(), bpp::DistanceEstimation::setVerbose(), bpp::TextTools::toString(), bpp::DistanceMethodInterface::tree(), and bpp::OptimizationTools::OptimizationOptions::verbose.
|
static |
Estimate a distance matrix using maximum likelihood.
This method estimate a distance matrix using a DistanceEstimation object. The main issue here is to estimate non-branch lengths parameters, as substitution model and rate distribution parameters. Twoe options are provideed here:
estimationMethod | The distance estimation object to use. |
parametersToIgnore | A list of parameters to ignore while optimizing parameters. |
param | String describing the type of optimization to use. |
verbose | Verbose level. |
Definition at line 624 of file OptimizationTools.cpp.
References bpp::ParameterList::addParameters(), bpp::DistanceEstimation::computeMatrix(), bpp::ParameterList::deleteParameters(), bpp::ApplicationTools::displayTask(), bpp::ApplicationTools::displayTaskDone(), DISTANCEMETHOD_INIT, DISTANCEMETHOD_PAIRWISE, bpp::DistanceEstimation::getMatrix(), bpp::ParameterList::getParameterNames(), bpp::SubstitutionProcessInterface::getRateDistributionParameters(), bpp::SubstitutionProcessInterface::getRootFrequenciesParameters(), bpp::SubstitutionProcessInterface::getSubstitutionModelParameters(), bpp::DistanceEstimation::process(), bpp::DistanceEstimation::resetAdditionalParameters(), bpp::DistanceEstimation::setAdditionalParameters(), and bpp::DistanceEstimation::setVerbose().
|
static |
Optimize numerical parameters (branch length, substitution model & rate distribution) of a TreeLikelihood function.
Uses Newton's method for branch length and Brent or BFGS one dimensional method for other parameters.
A condition over function values is used as a stop condition for the algorithm.
lik | A pointer toward the PhyloLikelihood object to optimize. |
optopt | Optimization Options |
Definition at line 353 of file OptimizationTools.cpp.
References bpp::ParameterList::addParameters(), bpp::AutoParameter::CONSTRAINTS_AUTO, bpp::ParameterList::createSubList(), bpp::ApplicationTools::displayMessage(), bpp::ParameterList::getCommonParametersWith(), bpp::ParameterList::getParameterNames(), bpp::MetaOptimizerInfos::IT_TYPE_FULL, bpp::MetaOptimizerInfos::IT_TYPE_STEP, bpp::OptimizationTools::OptimizationOptions::listener, bpp::OptimizationTools::OptimizationOptions::messenger, bpp::OptimizationTools::OptimizationOptions::nbEvalMax, bpp::OptimizationTools::OptimizationOptions::nstep, OPTIMIZATION_BFGS, OPTIMIZATION_BRENT, OPTIMIZATION_GRADIENT, OPTIMIZATION_NEWTON, bpp::OptimizationTools::OptimizationOptions::optMethodDeriv, bpp::OptimizationTools::OptimizationOptions::optMethodModel, bpp::OptimizationTools::OptimizationOptions::parameters, bpp::OptimizationTools::OptimizationOptions::profiler, bpp::OptimizationTools::OptimizationOptions::reparametrization, bpp::OptimizationTools::OptimizationOptions::tolerance, and bpp::OptimizationTools::OptimizationOptions::verbose.
Referenced by buildDistanceTree(), and bpp::PhylogeneticsApplicationTools::optimizeParameters().
|
static |
Optimize numerical parameters (branch length, substitution model & rate distribution) of a TreeLikelihood function.
Uses Newton's method for all parameters, branch length derivatives are computed analytically, derivatives for other parameters numerically.
lik | A pointer toward the PhyloLikelihood object to optimize. |
optopt | Optimization Options |
Exception | any exception thrown by the Optimizer. |
Definition at line 451 of file OptimizationTools.cpp.
References bpp::AutoParameter::CONSTRAINTS_AUTO, bpp::ParameterList::createSubList(), bpp::ApplicationTools::displayMessage(), bpp::ParameterList::getParameterNames(), bpp::OptimizationTools::OptimizationOptions::listener, bpp::OptimizationTools::OptimizationOptions::messenger, bpp::OptimizationTools::OptimizationOptions::nbEvalMax, OPTIMIZATION_BFGS, OPTIMIZATION_GRADIENT, OPTIMIZATION_NEWTON, bpp::OptimizationTools::OptimizationOptions::optMethodDeriv, bpp::OptimizationTools::OptimizationOptions::parameters, bpp::OptimizationTools::OptimizationOptions::profiler, bpp::OptimizationTools::OptimizationOptions::reparametrization, bpp::ParameterList::reset(), bpp::OptimizationTools::OptimizationOptions::tolerance, and bpp::OptimizationTools::OptimizationOptions::verbose.
Referenced by bpp::PhylogeneticsApplicationTools::optimizeParameters().
|
static |
Definition at line 542 of file OptimizationTools.cpp.
References bpp::AutoParameter::CONSTRAINTS_AUTO, bpp::ParameterList::createSubList(), bpp::ApplicationTools::displayMessage(), bpp::FivePoints, bpp::ParameterList::getParameterNames(), bpp::OptimizationTools::OptimizationOptions::listener, bpp::OptimizationTools::OptimizationOptions::messenger, bpp::OptimizationTools::OptimizationOptions::nbEvalMax, OPTIMIZATION_BFGS, OPTIMIZATION_GRADIENT, OPTIMIZATION_NEWTON, bpp::OptimizationTools::OptimizationOptions::optMethodDeriv, bpp::OptimizationTools::OptimizationOptions::parameters, bpp::OptimizationTools::OptimizationOptions::profiler, bpp::OptimizationTools::OptimizationOptions::reparametrization, bpp::ThreePoints, bpp::OptimizationTools::OptimizationOptions::tolerance, and bpp::OptimizationTools::OptimizationOptions::verbose.
|
static |
Definition at line 223 of file OptimizationTools.h.
Referenced by estimateDistanceMatrix().
|
static |
Definition at line 225 of file OptimizationTools.h.
Referenced by buildDistanceTree().
|
static |
Definition at line 224 of file OptimizationTools.h.
Referenced by buildDistanceTree(), and estimateDistanceMatrix().
|
static |
Definition at line 76 of file OptimizationTools.h.
Referenced by bpp::OptimizationTools::OptimizationOptions::OptimizationOptions(), bpp::LegacyOptimizationTools::optimizeBranchLengthsParameters(), bpp::LegacyOptimizationTools::optimizeNumericalParameters(), optimizeNumericalParameters(), bpp::LegacyOptimizationTools::optimizeNumericalParameters2(), optimizeNumericalParameters2(), bpp::PhylogeneticsApplicationTools::optimizeParameters(), and bpp::LegacyPhylogeneticsApplicationTools::optimizeParameters().
|
static |
Definition at line 75 of file OptimizationTools.h.
Referenced by bpp::OptimizationTools::OptimizationOptions::OptimizationOptions(), bpp::LegacyOptimizationTools::optimizeNumericalParameters(), optimizeNumericalParameters(), bpp::PhylogeneticsApplicationTools::optimizeParameters(), and bpp::LegacyPhylogeneticsApplicationTools::optimizeParameters().
|
static |
Definition at line 73 of file OptimizationTools.h.
Referenced by bpp::OptimizationTools::OptimizationOptions::OptimizationOptions(), bpp::LegacyOptimizationTools::optimizeBranchLengthsParameters(), bpp::LegacyOptimizationTools::optimizeNumericalParameters(), optimizeNumericalParameters(), bpp::LegacyOptimizationTools::optimizeNumericalParameters2(), optimizeNumericalParameters2(), and bpp::LegacyPhylogeneticsApplicationTools::optimizeParameters().
|
static |
Definition at line 74 of file OptimizationTools.h.
Referenced by bpp::OptimizationTools::OptimizationOptions::OptimizationOptions(), bpp::LegacyOptimizationTools::optimizeBranchLengthsParameters(), bpp::LegacyOptimizationTools::optimizeNumericalParameters(), optimizeNumericalParameters(), bpp::LegacyOptimizationTools::optimizeNumericalParameters2(), optimizeNumericalParameters2(), bpp::PhylogeneticsApplicationTools::optimizeParameters(), and bpp::LegacyPhylogeneticsApplicationTools::optimizeParameters().