Skip to content

Instantly share code, notes, and snippets.

@erdogant
Created August 24, 2022 09:51
Show Gist options
  • Select an option

  • Save erdogant/8ac27cc36cab8597a4805404cb1f445d to your computer and use it in GitHub Desktop.

Select an option

Save erdogant/8ac27cc36cab8597a4805404cb1f445d to your computer and use it in GitHub Desktop.
hgboost
# Import the library
from hgboost import hgboost
# Initialize library.
hgb = hgboost(
max_eval=250, # Search space is based on the number of evaluations.
threshold=0.5, # Classification threshold. In case of two-class model this is 0.5.
cv=5, # k-folds cross-validation.
test_size=0.2, # Percentage split for the testset.
val_size=0.2, # Percentage split for the validationset.
top_cv_evals=10, # Number of top best performing models that is evaluated.
is_unbalance=True, # Control the balance of positive and negative weights, useful for unbalanced classes.
random_state=None, # Fix the random state to create reproducible results.
n_jobs=-1, # The number of CPU jobs to run in parallel. -1 means using all processors.
gpu=False, # Compute using GPU in case of True.
verbose=3, # Print progress to screen.
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment