Class interp_krige_optim (o2scl)

O2scl : Class List

template<class vec_t = boost::numeric::ublas::vector<double>, class vec2_t = vec_t, class func_t = covar_funct, class mat_t = boost::numeric::ublas::matrix<double>, class mat_inv_t = o2scl_linalg::matrix_invert_det_cholesky<mat_t>, class vec_vec_t = std::vector<std::vector<double>>>
class interp_krige_optim : public o2scl::interp_krige<boost::numeric::ublas::vector<double>, boost::numeric::ublas::vector<double>, std::function<double(double, double)>, std::function<double(double, double, double)>, boost::numeric::ublas::matrix<double>, o2scl_linalg::matrix_invert_det_cholesky<boost::numeric::ublas::matrix<double>>>

One-dimensional interpolation optimizing a user-specified covariance function.

See also the Interpolation section of the O2scl User’s guide.

Note

This class is experimental.

Interface with \ref o2scl::interp_krige

std::function<double(double, double)> ff
std::function<double(double, double)> ffd
std::function<double(double, double)> ffd2
std::function<double(double, double, double)> ffi
bool full_min

If true, perform a full minimization (default false)

inline double qual_fun(int &success)

Function to optimize the covariance parameters.

inline double min_fun(size_t n, const ubvector &v)

Minimization function for the covariance parameters.

inline interp_krige_optim()

Function to minimize and various option

size_t mode

Function to minimize (default mode_loo_cv)

static const size_t mode_loo_cv_bf = 1

Leave-one-out cross validation (brute force version)

static const size_t mode_max_lml = 2

Maximize Log-marginal-likelihood.

static const size_t mode_loo_cv = 3

Leave-one-out cross validation method (default)

static const size_t mode_loo_cv_bf_rel = 4

Leave-one-out cross validation with relative deviations (brute force version)

Public Types

typedef boost::numeric::ublas::matrix<double> ubmatrix
typedef boost::numeric::ublas::vector<double> ubvector

Public Functions

inline int set_covar_optim(func_t &covar, vec_vec_t &param_lists, bool rescale = false)

Set the covariance function and parameter lists.

inline virtual void set(size_t size, const vec_t &x, const vec2_t &y)

Set the vectors.

Note

This function always uses the previous value of the rescaling parameter, which is different than the other form of the set() function which sets rescale to false by default.

inline int set(size_t size, const vec_t &x, const vec2_t &y, func_t &covar, vec_vec_t &param_lists, bool rescale = false)

Initialize interpolation routine with optional rescaling.

Note

This function sets rescale to false by default which is different than the other form of the set() function which always uses the previous value.

Public Members

int verbose

Verbosity parameter.

mmin_simp2 def_mmin

Default minimizer.

Protected Attributes

func_t *cf

Pointer to the covariance function.

vec_vec_t plists

List of parameter values to try.

double qual

The quality factor of the optimization.

mmin_base *mp

Pointer to the user-specified minimizer.