ʻOhana
Population structure, admixture history, and selection using learning methods.
|
A template for a class that performs the Nelder-Mead optimization. This class implements shared features of the two concrete controllers of this module, one that uses a Newick tree as input and another that does not. More...
#include <jade.controller.hpp>
Public Types | |
typedef TValue | value_type |
The value type. More... | |
typedef basic_likelihood< value_type > | likelihood_type |
The likelihood type. More... | |
typedef basic_matrix< value_type > | matrix_type |
The matrix type. More... | |
typedef basic_options< value_type > | options_type |
The options type. More... | |
typedef basic_settings< value_type > | settings_type |
The settings type. More... | |
typedef basic_simplex< value_type > | simplex_type |
The simplex type. More... | |
typedef simplex_type::container_type | container_type |
The container type for the simplex. More... | |
typedef simplex_type::exit_condition_type | exit_condition_type |
The exit condition for the simplex. More... | |
typedef simplex_type::log_args | log_args_type |
The loc arguments for the simplex. More... | |
Public Member Functions | |
virtual | ~basic_controller () |
Reclaims resources, if any, used by the instance. More... | |
value_type | compute_objfunc (const container_type ¶ms) |
Computes the objective function by decoding the specified Nelder- Mead parameters into a covariance matrix, performing a Cholskey square root, calculating the determinant, computing the inverse, and calling the likelihood function. More... | |
virtual void | emit_results (const options_type &opts, const simplex_type &simplex, const exit_condition_type &) |
Writes results to standard output and files. More... | |
const matrix_type & | get_c () const |
size_t | get_rk () const |
virtual container_type | init_parameters ()=0 |
Creates and returns the initial set of parameters for the Nelder- Mead algorithm. More... | |
void | log_iteration (const log_args_type &log_args) |
Logs information about the specified context for one iteration of the Nelder-Mead algorithm. More... | |
Protected Member Functions | |
basic_controller (const settings_type &settings) | |
Initializes a new instance of the class based on the specified settings. More... | |
virtual bool | _decode_lower (matrix_type &dst, const container_type &src)=0 |
Decodes the specified Nelder-Mead container and stores the result into the lower triangle, including the diagonal, of the covariance matrix. More... | |
A template for a class that performs the Nelder-Mead optimization. This class implements shared features of the two concrete controllers of this module, one that uses a Newick tree as input and another that does not.
Definition at line 23 of file jade.controller.hpp.
typedef simplex_type::container_type jade::basic_controller< TValue >::container_type |
The container type for the simplex.
Definition at line 45 of file jade.controller.hpp.
typedef simplex_type::exit_condition_type jade::basic_controller< TValue >::exit_condition_type |
The exit condition for the simplex.
Definition at line 48 of file jade.controller.hpp.
typedef basic_likelihood<value_type> jade::basic_controller< TValue >::likelihood_type |
The likelihood type.
Definition at line 30 of file jade.controller.hpp.
typedef simplex_type::log_args jade::basic_controller< TValue >::log_args_type |
The loc arguments for the simplex.
Definition at line 51 of file jade.controller.hpp.
typedef basic_matrix<value_type> jade::basic_controller< TValue >::matrix_type |
The matrix type.
Definition at line 33 of file jade.controller.hpp.
typedef basic_options<value_type> jade::basic_controller< TValue >::options_type |
The options type.
Definition at line 36 of file jade.controller.hpp.
typedef basic_settings<value_type> jade::basic_controller< TValue >::settings_type |
The settings type.
Definition at line 39 of file jade.controller.hpp.
typedef basic_simplex<value_type> jade::basic_controller< TValue >::simplex_type |
The simplex type.
Definition at line 42 of file jade.controller.hpp.
typedef TValue jade::basic_controller< TValue >::value_type |
The value type.
Definition at line 27 of file jade.controller.hpp.
|
inlinevirtual |
Reclaims resources, if any, used by the instance.
Definition at line 56 of file jade.controller.hpp.
|
inlineexplicitprotected |
Initializes a new instance of the class based on the specified settings.
settings | The algorithm settings. |
Definition at line 207 of file jade.controller.hpp.
|
protectedpure virtual |
Decodes the specified Nelder-Mead container and stores the result into the lower triangle, including the diagonal, of the covariance matrix.
dst | The covariance matrix. |
src | The Nelder-Mead container. |
Implemented in jade::basic_treeless_controller< TValue >, jade::basic_tree_controller< TValue >, and jade::basic_agi_controller< TValue >.
|
inline |
Computes the objective function by decoding the specified Nelder- Mead parameters into a covariance matrix, performing a Cholskey square root, calculating the determinant, computing the inverse, and calling the likelihood function.
params | The parameters. |
Definition at line 68 of file jade.controller.hpp.
|
inlinevirtual |
Writes results to standard output and files.
opts | The options. |
simplex | The simplex. |
Reimplemented in jade::basic_tree_controller< TValue >, and jade::basic_agi_controller< TValue >.
Definition at line 110 of file jade.controller.hpp.
|
inline |
Definition at line 156 of file jade.controller.hpp.
|
inline |
Definition at line 164 of file jade.controller.hpp.
|
pure virtual |
Creates and returns the initial set of parameters for the Nelder- Mead algorithm.
Implemented in jade::basic_treeless_controller< TValue >, jade::basic_tree_controller< TValue >, and jade::basic_agi_controller< TValue >.
|
inline |
Logs information about the specified context for one iteration of the Nelder-Mead algorithm.
log_args | The Nelder-Mead arguments. |
Definition at line 181 of file jade.controller.hpp.