Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jungtaekkim committed Apr 11, 2021
1 parent 7bb1a73 commit 88531f8
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/04_benchmarks/example_benchmarks_ackley_bo_ei.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os

from bayeso import bo
from benchmarks.inf_dim_ackley import Ackley
from bayeso_benchmarks.inf_dim_ackley import Ackley
from bayeso.wrappers import wrappers_bo
from bayeso.utils import utils_bo
from bayeso.utils import utils_plotting
Expand Down
2 changes: 1 addition & 1 deletion examples/04_benchmarks/example_benchmarks_branin_bo_ei.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os

from bayeso import bo
from benchmarks.two_dim_branin import Branin
from bayeso_benchmarks.two_dim_branin import Branin
from bayeso.wrappers import wrappers_bo
from bayeso.utils import utils_bo
from bayeso.utils import utils_plotting
Expand Down
2 changes: 1 addition & 1 deletion examples/04_benchmarks/example_benchmarks_branin_gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from bayeso.gp import gp
from bayeso.utils import utils_common
from bayeso.utils import utils_plotting
from benchmarks.two_dim_branin import Branin
from bayeso_benchmarks.two_dim_branin import Branin


STR_FUN_TARGET = 'branin'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os

from bayeso import bo
from benchmarks.two_dim_eggholder import Eggholder
from bayeso_benchmarks.two_dim_eggholder import Eggholder
from bayeso.wrappers import wrappers_bo
from bayeso.utils import utils_bo
from bayeso.utils import utils_plotting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os

from bayeso import bo
from benchmarks.six_dim_hartmann6d import Hartmann6D
from bayeso_benchmarks.six_dim_hartmann6d import Hartmann6D
from bayeso.wrappers import wrappers_bo
from bayeso.utils import utils_bo
from bayeso.utils import utils_plotting
Expand Down
2 changes: 1 addition & 1 deletion examples/99_notebooks/example_bo_branin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"import numpy as np\n",
"\n",
"from bayeso import bo\n",
"from benchmarks.two_dim_branin import Branin\n",
"from bayeso_benchmarks.two_dim_branin import Branin\n",
"from bayeso.wrappers import wrappers_bo\n",
"from bayeso.utils import utils_plotting"
]
Expand Down
5 changes: 3 additions & 2 deletions examples/99_notebooks/example_hpo_xgboost.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"def fun_target(bx):\n",
" model_xgb = xgb.XGBClassifier(\n",
" max_depth=int(bx[0]),\n",
" n_estimators=int(bx[1])\n",
" n_estimators=int(bx[1]),\n",
" use_label_encoder=False\n",
" )\n",
" model_xgb.fit(data_train, labels_train)\n",
" model_xgb.fit(data_train, labels_train, eval_metric='mlogloss')\n",
" preds_test = model_xgb.predict(data_test)\n",
" return 1.0 - sklearn.metrics.accuracy_score(labels_test, preds_test)"
]
Expand Down

0 comments on commit 88531f8

Please sign in to comment.