67 fp.readOrWrite(
"mCurrentIter", mCurrentIter);
68 fp.readOrWrite(
"mCounterStuck", mCounterStuck);
69 fp.readOrWrite(
"mYPrev", mYPrev);
71 fp.readOrWrite(
"mParameters.n_iterations", mParameters.
n_iterations);
73 fp.readOrWrite(
"mParameters.n_init_samples", mParameters.
n_init_samples);
74 fp.readOrWrite(
"mParameters.n_iter_relearn", mParameters.
n_iter_relearn);
75 fp.readOrWrite(
"mParameters.init_method", mParameters.
init_method);
77 fp.readOrWrite(
"mParameters.surr_name", mParameters.
surr_name);
78 fp.readOrWrite(
"mParameters.sigma_s", mParameters.
sigma_s);
79 fp.readOrWrite(
"mParameters.noise", mParameters.
noise);
80 fp.readOrWrite(
"mParameters.alpha", mParameters.
alpha);
81 fp.readOrWrite(
"mParameters.beta", mParameters.
beta);
85 mParameters.
sc_type = str2score(fp.read(
"mParameters.sc_type").c_str());
86 mParameters.
l_type = str2learn(fp.read(
"mParameters.l_type").c_str());
88 else if(fp.isWriting()){
89 fp.write(
"mParameters.sc_type",score2str(mParameters.
sc_type));
90 fp.write(
"mParameters.l_type", learn2str(mParameters.
l_type));
93 fp.readOrWrite(
"mParameters.l_all", mParameters.
l_all);
94 fp.readOrWrite(
"mParameters.epsilon", mParameters.
epsilon);
95 fp.readOrWrite(
"mParameters.force_jump", mParameters.
force_jump);
97 fp.readOrWrite(
"mParameters.kernel.name", mParameters.
kernel.
name);
98 fp.readOrWrite(
"mParameters.kernel.hp_mean", mParameters.
kernel.
hp_mean);
99 fp.readOrWrite(
"mParameters.kernel.hp_std", mParameters.
kernel.
hp_std);
101 fp.readOrWrite(
"mParameters.mean.name", mParameters.
mean.
name);
102 fp.readOrWrite(
"mParameters.mean.coef_mean", mParameters.
mean.
coef_mean);
103 fp.readOrWrite(
"mParameters.mean.coef_std", mParameters.
mean.
coef_std);
105 fp.readOrWrite(
"mParameters.crit_name", mParameters.
crit_name);
106 fp.readOrWrite(
"mParameters.crit_params", mParameters.
crit_params);
108 fp.readOrWrite(
"mY", mY);
109 fp.readOrWrite(
"mX", mX);
double epsilon
For epsilon-greedy exploration.
KernelParameters kernel
Kernel parameters.
bool l_all
Learn all hyperparameters or only kernel.
size_t load_save_flag
1-Load data,2-Save data, 3-Load and save data.
std::string name
Name of the mean function.
void saveToFile(std::string filename)
Creates or overwrites the provided file with the state.
vectord coef_std
Basis function coefficients (std)
MeanParameters mean
Mean (parametric function) parameters.
double sigma_s
Signal variance (if known).
vectord hp_mean
Kernel hyperparameters prior (mean, log space)
Namespace of the library interface.
learning_type l_type
Type of learning for the kernel params.
std::string load_filename
Init data file path (if applicable)
vectord coef_mean
Basis function coefficients (mean)
size_t n_init_samples
Number of samples before optimization.
vectord crit_params
Criterion hyperparameters (if needed)
size_t n_inner_iterations
Maximum inner optimizer evaluations.
double beta
Inverse Gamma prior for signal var.
bool loadFromFile(std::string filename, Parameters &program_params)
Loads the state from the provided file and takes program_params values if needed. ...
size_t n_iterations
Maximum BayesOpt evaluations (budget)
size_t force_jump
If >0, and the difference between two consecutive observations is pure noise, for n consecutive steps...
Representation of a optimization state.
vectord hp_std
Kernel hyperparameters prior (st dev, log space)
std::string surr_name
Name of the surrogate function.
std::string log_filename
Log file path (if applicable)
double alpha
Inverse Gamma prior for signal var.
BOptState()
Constructor, parameters set into default.
std::string crit_name
Name of the criterion.
int verbose_level
Neg-Error,0-Warning,1-Info,2-Debug -> stdout 3-Error,4-Warning,5-Info,>5-Debug -> logfile...
size_t init_method
Sampling method for initial set 1-LHS, 2-Sobol (if available), other value-uniformly distributed...
double noise
Variance of observation noise (and nugget)
Functions to write and parse data files.
std::string name
Name of the kernel function.
score_type sc_type
Score type for kernel hyperparameters (ML,MAP,etc)
std::string save_filename
Sava data file path (if applicable)
int random_seed
>=0 -> Fixed seed, <0 -> Time based (variable).
size_t n_iter_relearn
Number of samples before relearn kernel.