Merge pull request #279 from yangdsh/improve_gpr
fix bug in simulation.py
This commit is contained in:
commit
071f2cdb53
|
@ -263,15 +263,15 @@ def run_optimize(X, y, X_samples, model_name, opt_kwargs, model_kwargs):
|
||||||
m = gpr_models.create_model(model_name, X=X, y=y, **model_kwargs)
|
m = gpr_models.create_model(model_name, X=X, y=y, **model_kwargs)
|
||||||
timer.stop()
|
timer.stop()
|
||||||
model_creation_sec = timer.elapsed_seconds
|
model_creation_sec = timer.elapsed_seconds
|
||||||
LOG.info(m._model.as_pandas_table())
|
LOG.info(m.model.as_pandas_table())
|
||||||
|
|
||||||
# Optimize the DBMS's configuration knobs
|
# Optimize the DBMS's configuration knobs
|
||||||
timer.start()
|
timer.start()
|
||||||
X_news, ypreds, _, _ = tf_optimize(m.model, X_samples, **opt_kwargs)
|
X_news, _, _, loss = tf_optimize(m.model, X_samples, **opt_kwargs)
|
||||||
timer.stop()
|
timer.stop()
|
||||||
config_optimize_sec = timer.elapsed_seconds
|
config_optimize_sec = timer.elapsed_seconds
|
||||||
|
|
||||||
return X_news, ypreds, m.get_model_parameters(), m.get_hyperparameters()
|
return X_news, loss, m.get_model_parameters(), m.get_hyperparameters()
|
||||||
|
|
||||||
|
|
||||||
def gpr_new(env, config, n_loops=100):
|
def gpr_new(env, config, n_loops=100):
|
||||||
|
|
Loading…
Reference in New Issue