Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
LocalCascadeEnsemble committed Jul 8, 2022
1 parent e7e995d commit a66d468
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion lce/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.6"
__version__ = "0.2.7"
48 changes: 24 additions & 24 deletions lce/_xgboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def f(params):
return {"loss": -best, "status": STATUS_OK}

rstate = np.random.default_rng(random_state)
best = fmin(
best_config = fmin(
fn=f,
space=space,
algo=tpe.suggest,
Expand All @@ -237,18 +237,18 @@ def f(params):

# Fit best model
final_params = {
"n_estimators": n_estimators[best["n_estimators"]],
"max_depth": max_depth[best["max_depth"]],
"learning_rate": learning_rate[best["learning_rate"]],
"n_estimators": n_estimators[best_config["n_estimators"]],
"max_depth": max_depth[best_config["max_depth"]],
"learning_rate": learning_rate[best_config["learning_rate"]],
"booster": booster,
"gamma": gamma[best["gamma"]],
"min_child_weight": min_child_weight[best["min_child_weight"]],
"subsample": subsample[best["subsample"]],
"colsample_bytree": colsample_bytree[best["colsample_bytree"]],
"colsample_bylevel": colsample_bylevel[best["colsample_bylevel"]],
"colsample_bynode": colsample_bynode[best["colsample_bynode"]],
"reg_alpha": reg_alpha[best["reg_alpha"]],
"reg_lambda": reg_lambda[best["reg_lambda"]],
"gamma": gamma[best_config["gamma"]],
"min_child_weight": min_child_weight[best_config["min_child_weight"]],
"subsample": subsample[best_config["subsample"]],
"colsample_bytree": colsample_bytree[best_config["colsample_bytree"]],
"colsample_bylevel": colsample_bylevel[best_config["colsample_bylevel"]],
"colsample_bynode": colsample_bynode[best_config["colsample_bynode"]],
"reg_alpha": reg_alpha[best_config["reg_alpha"]],
"reg_lambda": reg_lambda[best_config["reg_lambda"]],
"objective": "multi:softprob",
"num_class": n_classes,
"n_jobs": n_jobs,
Expand Down Expand Up @@ -476,7 +476,7 @@ def f(params):
return {"loss": best, "status": STATUS_OK}

rstate = np.random.default_rng(random_state)
best = fmin(
best_config = fmin(
fn=f,
space=space,
algo=tpe.suggest,
Expand All @@ -488,18 +488,18 @@ def f(params):

# Fit best model
final_params = {
"n_estimators": n_estimators[best["n_estimators"]],
"max_depth": max_depth[best["max_depth"]],
"learning_rate": learning_rate[best["learning_rate"]],
"n_estimators": n_estimators[best_config["n_estimators"]],
"max_depth": max_depth[best_config["max_depth"]],
"learning_rate": learning_rate[best_config["learning_rate"]],
"booster": booster,
"gamma": gamma[best["gamma"]],
"min_child_weight": min_child_weight[best["min_child_weight"]],
"subsample": subsample[best["subsample"]],
"colsample_bytree": colsample_bytree[best["colsample_bytree"]],
"colsample_bylevel": colsample_bylevel[best["colsample_bylevel"]],
"colsample_bynode": colsample_bynode[best["colsample_bynode"]],
"reg_alpha": reg_alpha[best["reg_alpha"]],
"reg_lambda": reg_lambda[best["reg_lambda"]],
"gamma": gamma[best_config["gamma"]],
"min_child_weight": min_child_weight[best_config["min_child_weight"]],
"subsample": subsample[best_config["subsample"]],
"colsample_bytree": colsample_bytree[best_config["colsample_bytree"]],
"colsample_bylevel": colsample_bylevel[best_config["colsample_bylevel"]],
"colsample_bynode": colsample_bynode[best_config["colsample_bynode"]],
"reg_alpha": reg_alpha[best_config["reg_alpha"]],
"reg_lambda": reg_lambda[best_config["reg_lambda"]],
"objective": "reg:squarederror",
"n_jobs": n_jobs,
"random_state": random_state,
Expand Down

0 comments on commit a66d468

Please sign in to comment.