8000 How to describe search space like xgb in space.py · Issue #27 · AIworx-Labs/chocolate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

How to describe search space like xgb in space.py #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yangzhg opened this issue Mar 20, 2019 · 1 comment
Open

How to describe search space like xgb in space.py #27

yangzhg opened this issue Mar 20, 2019 · 1 comment
Assignees

Comments

@yangzhg
Copy link
yangzhg commented Mar 20, 2019

how to describe xgb parameters inlcude booster subparameters using space.py,
mycode

{
           "min_child_weight": choco.uniform(0, 20),
           "n_estimators": choco.quantized_uniform(25, 525, 20),
           "max_depth": choco.quantized_uniform(1, 20, 1),
           "subsample": choco.uniform(0.7, 1.0),
           "learning_rate": choco.uniform(0.001, 1.0),
           "colsample_bytree": choco.uniform(0.1, 1.0),
           "colsample_bylevel": choco.uniform(0.1, 1.0),
           "reg_alpha": choco.log(-10, -1, 10),
           "reg_lambda": choco.log(-10, -1, 10),
           "booster": {
               "gbtree": None,
               "gblinear": {
                   "updater": {
                       "shotgun": None, "coord_descent": None
                   },
                   "feature_selector": {
                       "cyclic": None, "shuffle": None,
                       "random": None, "greedy": None,
                       "thrifty": None
                   }
               },
               "dart": {
                   "sample_type": {
                       "uniform": None,
                       "weighted": None
                   },
                   "normalize_type": {
                       "tree": None,
                       "forest": None
                   },
                   "rate_drop": choco.uniform(0.0, 1.0),
                   "skip_drop": choco.uniform(0.0, 1.0),
               }
           },
       }

only generate
{'booster': 'dart', 'colsample_bylevel': 0.18988467350254096, 'colsample_bytree': 0.14279195511563256, 'learning_rate': 0.5499628359285743, 'max_depth': 12, 'min_child_weight': 11.517182050898144, 'n_estimators': 65, 'reg_alpha': 0.0008107887387917439, 'reg_lambda': 1.995310903080172e-10, 'subsample': 0.8042911086851237},sample_type and normalize_type dose not generated

@leconteur leconteur self-assigned this Mar 20, 2019
@leconteur
Copy link
Contributor

In this case, you should use choco.choice(["uniform", "weighted"]) as a distribution instead of a dict containing an empty key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0