Created
August 16, 2020 20:27
-
-
Save pkgandhi/43fd29aaee0a7df18ef3a45fc4924995 to your computer and use it in GitHub Desktop.
Defining the parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def objective(trial): | |
# Categorical parameter | |
optimizer = trial.suggest_categorical('rf_criterion', ['gini', 'entropy']) | |
# Int parameter | |
num_layers = trial.suggest_int("rf_n_estimators", 10, 1000) | |
# Uniform parameter | |
dropout_rate = trial.suggest_uniform('rf_min_weight_fraction_leaf', 0.0, 1.0) | |
# Loguniform parameter | |
learning_rate = trial.suggest_loguniform('rf_parameter_x', 1e-5, 1e-2) | |
# Discrete-uniform parameter | |
drop_path_rate = trial.suggest_discrete_uniform('rf_parameter_y', 0.0, 1.0, 0.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment