libcmaes 0.10.2
A C++11 library for stochastic optimization with CMA-ES
Loading...
Searching...
No Matches
libcmaes::errstats< TGenoPheno > Class Template Reference

Static Public Member Functions

static pli profile_likelihood (FitFunc &func, const CMAParameters< TGenoPheno > &parameters, CMASolutions &cmasol, const int &k, const bool &curve=false, const int &samplesize=10, const double &fup=0.1, const double &delta=0.1, const int &maxiters=1e4)
 computes the profile likelihood in dimension k around a previously found optima
 
static CMASolutions optimize_vpk (FitFunc &func, const CMAParameters< TGenoPheno > &parameters, const CMASolutions &cmasol, const std::vector< int > &k, const std::vector< double > &vk, const dVec &x0, const bool &pheno_x0=true, const bool &pheno_vk=true)
 optimizes an objective function while fixing the value of parameters in several dimensions
 
static CMASolutions optimize_pk (FitFunc &func, const CMAParameters< TGenoPheno > &parameters, const CMASolutions &cmasol, const int &k, const double &vk, const dVec &x0, const bool &pheno_x0=true, const bool &pheno_vk=true)
 optimizes an objective function while fixing the value of parameters in dimension k
 
static contour contour_points (FitFunc &func, const int &px, const int &py, const int &npoints, const double &fup, const CMAParameters< TGenoPheno > &parameters, CMASolutions &cmasol, const double &delta=0.1, const int &maxiters=1e4)
 computes a set of contour points around a function minima, for a deviation fup in objective function value
 

Static Private Member Functions

static void profile_likelihood_search (FitFunc &func, const CMAParameters< TGenoPheno > &parameters, pli &le, const CMASolutions &cmasol, const int &k, const bool &neg, const int &samplesize, const double &fup, const double &delta, const int &maxiters, const bool &curve)
 computes and search the profile likelihood points in dimension k around a previously found optima and in a given direction
 
static void take_linear_step (FitFunc &func, const CMAParameters< TGenoPheno > &parameters, const int &k, const double &minfvalue, const double &fup, const double &delta, const int &n, const bool &linit, const dMat &eigenve, double &d, dVec &x)
 take a linesearch step in a given direction Note: the search takes place in geno-space
 
static fcross cross (FitFunc &func, const CMAParameters< TGenoPheno > &parameters, CMASolutions &cmasol, const double &fup, const std::vector< int > &par, const std::vector< double > &pmid, const std::vector< double > &pdir, const double &ftol)
 finds crossing point
 

Member Function Documentation

◆ contour_points()

template<class TGenoPheno >
contour libcmaes::errstats< TGenoPheno >::contour_points ( FitFunc &  func,
const int px,
const int py,
const int npoints,
const double fup,
const CMAParameters< TGenoPheno > &  parameters,
CMASolutions cmasol,
const double delta = 0.1,
const int maxiters = 1e4 
)
static

computes a set of contour points around a function minima, for a deviation fup in objective function value

Parameters
funcobjective function
pxfirst dimension for contour points computation
pysecond dimension for contour points computation
npointsnumber of points to be computed in contour
fupthe function deviation for which to compute the contour
parametersstochastic search parameters
cmasolsolution object that contains the previously found optima
deltatolerance around fvalue + fup for which to compute the profile likelihood
maxitersmaximum number of linesearch tentatives for computing the profile likelihood
Returns
contour object that contains the contour points

◆ cross()

template<class TGenoPheno >
fcross libcmaes::errstats< TGenoPheno >::cross ( FitFunc &  func,
const CMAParameters< TGenoPheno > &  parameters,
CMASolutions cmasol,
const double fup,
const std::vector< int > &  par,
const std::vector< double > &  pmid,
const std::vector< double > &  pdir,
const double ftol 
)
staticprivate

finds crossing point

Parameters
parametersstochastic search parameters
cmasolsolution object that contains the previously foundoptima
fupthe function deviation for which to compute the contour
parpair of dimensions to work in
pmidmiddle point in both dimensions
pdirdirection in both dimensions
ftoltolerance around fvalue + fup
Returns
crossing object

◆ optimize_pk()

template<class TGenoPheno >
CMASolutions libcmaes::errstats< TGenoPheno >::optimize_pk ( FitFunc &  func,
const CMAParameters< TGenoPheno > &  parameters,
const CMASolutions cmasol,
const int k,
const double vk,
const dVec &  x0,
const bool pheno_x0 = true,
const bool pheno_vk = true 
)
static

optimizes an objective function while fixing the value of parameters in dimension k

Parameters
funcobjective function
parametersstochastic search parameters
cmasolsolution object that contains the previously found optima
kdimension into which to fix the parameter (i.e. search takes place in all other dimensions)
vkfixed value of parameter k
x0initial parameter values
pheno_x0whether x0 is in phenotype
pheno_vkwhether vk is in phenotype
Returns
optimization solution partial object with a single candidate that is the best candidate in full dimension

◆ optimize_vpk()

template<class TGenoPheno >
CMASolutions libcmaes::errstats< TGenoPheno >::optimize_vpk ( FitFunc &  func,
const CMAParameters< TGenoPheno > &  parameters,
const CMASolutions cmasol,
const std::vector< int > &  k,
const std::vector< double > &  vk,
const dVec &  x0,
const bool pheno_x0 = true,
const bool pheno_vk = true 
)
static

optimizes an objective function while fixing the value of parameters in several dimensions

Parameters
funcobjective function
parametersstochastic search parameters
cmasolsolution object that contains the previously found optima
kdimensions in which to fix parameters (i.e. search takes place in all other dimensions)
vkfixed values of parameters in dimensions of set k
x0initial parameter values
pheno_x0whether x0 is in phenotype
pheno_vkwhether vk is in phenotype
Returns
optimization solution partial object with a single candidate that is the best candidate in full dimension

◆ profile_likelihood()

template<class TGenoPheno >
pli libcmaes::errstats< TGenoPheno >::profile_likelihood ( FitFunc &  func,
const CMAParameters< TGenoPheno > &  parameters,
CMASolutions cmasol,
const int k,
const bool curve = false,
const int samplesize = 10,
const double fup = 0.1,
const double delta = 0.1,
const int maxiters = 1e4 
)
static

computes the profile likelihood in dimension k around a previously found optima

Parameters
funcobjective function
parametersstochastic search parameters
cmasolsolution object that contains the previously found optima
kdimension in which to compute profile likelihood points
curvewhether to store all points during search in order to build a profile likelihood curve
samplesizenumber of steps of linesearch in every direction in dimension k
fupthe function deviation for which to compute the profile likelihood
deltatolerance around fvalue + fup for which to compute the profile likelihood
maxitersmaximum number of linesearch tentatives for computing the profile likelihood
Returns
profile likelihood object
See also
pli

◆ profile_likelihood_search()

template<class TGenoPheno >
void libcmaes::errstats< TGenoPheno >::profile_likelihood_search ( FitFunc &  func,
const CMAParameters< TGenoPheno > &  parameters,
pli le,
const CMASolutions cmasol,
const int k,
const bool neg,
const int samplesize,
const double fup,
const double delta,
const int maxiters,
const bool curve 
)
staticprivate

computes and search the profile likelihood points in dimension k around a previously found optima and in a given direction

Parameters
funcobjective function
parametersstochastic search parameters
cmasolsolution object that contains the previously found optima
kdimension in which to compute profile likelihood points
negwhether to go on the right (i.e. search direction)
curvewhether to store all points during search in order to build a profile likelihood curve
samplesizenumber of steps of linesearch in every direction in dimension k
fupthe function deviation for which to compute the profile likelihood
deltatolerance around fvalue + fup for which to compute the profile likelihood
maxitersmaximum number of linesearch tentatives for computing the profile likelihood

◆ take_linear_step()

template<class TGenoPheno >
void libcmaes::errstats< TGenoPheno >::take_linear_step ( FitFunc &  func,
const CMAParameters< TGenoPheno > &  parameters,
const int k,
const double minfvalue,
const double fup,
const double delta,
const int n,
const bool linit,
const dMat &  eigenve,
double d,
dVec &  x 
)
staticprivate

take a linesearch step in a given direction Note: the search takes place in geno-space

Parameters
funcobjective function
parametersstochastic search parameters
kdimension in which to compute profile likelihood points
minfvaluecurrent objective function min value
nnumber of steps allowed in linesearch
fupthe function deviation for which to compute the profile likelihood
deltatolerance around fvalue + fup for which to compute the profile likelihood
linitwhether this is the first linesearch call
eigenveeigenvectors
dstep
xvector on the line

The documentation for this class was generated from the following files: