Skip to content

Instantly share code, notes, and snippets.

@erdogant
Last active November 5, 2022 16:15
Show Gist options
  • Select an option

  • Save erdogant/0bf442fc9ae0817d2fed3cbb7b07f9eb to your computer and use it in GitHub Desktop.

Select an option

Save erdogant/0bf442fc9ae0817d2fed3cbb7b07f9eb to your computer and use it in GitHub Desktop.
hgboost
# Save model
status = hgb.save(filepath='hgboost_model.pkl', overwrite=True)
# [pypickle] Pickle file saved: [hgboost_model.pkl]
# [hgboost] >Saving.. True
# Load model
From hgboost import hgboost # Import library when using a fresh start
hgb = hgboost() # Initialize hgboost
results = hgb.load(filepath='hgboost_model.pkl') # Load the pickle file with model parameters and trained model.
# [pypickle] Pickle file loaded: [hgboost_model.pkl]
# [hgboost] >Loading succesful!
# Make predictions again
y_pred, y_proba = hgb.predict(X)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment