Last active
August 16, 2020 21:07
-
-
Save pkgandhi/bec0bdcd58a3f991e0d468ad1cfde1fb to your computer and use it in GitHub Desktop.
Adding attributes in the code
This file contains hidden or 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
| # Adding Attributes to Trial | |
| score = model_selection.cross_val_score(classifier_obj, X, y, n_jobs=-1, cv=3) | |
| accuracy = score.mean() | |
| trial.set_user_attr('accuracy', accuracy) | |
| # Adding Attributes to Study | |
| study.set_user_attr('contributors', ['Pratik']) | |
| study.set_user_attr('dataset', 'diabetes') | |
| # Printing Attributes: | |
| study.user_attrs | |
| # {'contributors': ['Pratik'], 'dataset': 'diabetes'} | |
| # Getting attributes from all the study | |
| study_summaries = optuna.get_all_study_summaries('experiments.pkl') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment