class gpr::capi::ParameterSearch

Overview

Owner of a gpr_psearch_t : ask-and-tell minimization over a box. More…

#include <gpr/capi/gpridge.hpp>
 
class ParameterSearch {
public:
    // structs
 
    struct Best;
 
    // construction
 
    ParameterSearch();
    ParameterSearch(gpr_psearch_t h, adopt_t);
    ParameterSearch(const ParameterSearch&);
    ParameterSearch(ParameterSearch&& other);
    ~ParameterSearch();
 
    // methods
 
    ParameterSearch& operator=(const ParameterSearch&);
    ParameterSearch& operator=(ParameterSearch&& other);
    void reset();
    gpr_psearch_t handle() const;
    operator bool() const;
    int dimension() const;
    void set_allowed_values(int axis, const std::vector<double>& values, bool categorical = false);
    void observe(const std::vector<double>& x, const std::vector<double>& y, const std::vector<double>& noise_var, const std::vector<double>& constraint, int n_obs);
    std::vector<double> propose(int q);
    Best best();
    static ParameterSearch create(const std::vector<double>& lower, const std::vector<double>& upper, const std::vector<PsearchAxis>& axis_kind = {}, BqKernel kernel = BqKernel::SquaredExponential, bool noisy = false);
};

Detailed Documentation

Owner of a gpr_psearch_t : ask-and-tell minimization over a box.

Methods

void observe(const std::vector<double>& x, const std::vector<double>& y, const std::vector<double>& noise_var, const std::vector<double>& constraint, int n_obs)

noise_var and constraint are empty when not supplied.

std::vector<double> propose(int q)

Row-major rows to evaluate next; at most q of them.

static ParameterSearch create(const std::vector<double>& lower, const std::vector<double>& upper, const std::vector<PsearchAxis>& axis_kind = {}, BqKernel kernel = BqKernel::SquaredExponential, bool noisy = false)

axis_kind is empty for linear axes.