How do I return all the hyperparameters of a CatBoost model?
NOTE: I do not think this is a dup of Print CatBoost hyperparameters since that question/answer doesn't address my need.
For example, with sklearn I can do:
rf = ensemble.RandomForestClassifier(min_samples_split=2)
print rf
RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',
max_depth=None, max_features='auto', max_leaf_nodes=None,
min_impurity_decrease=0.0, min_impurity_split=None,
min_samples_leaf=1, min_samples_split=2,
min_weight_fraction_leaf=0.0, n_estimators=10, n_jobs=1,
oob_score=False, random_state=None, verbose=0,
warm_start=False)
This returns all the hyperparameters, those I defined and the other defaults.
With Catboost I can use .get_params() but it seems to return only user specified parameters:
cat = CatBoostClassifier(loss_function='Logloss',
verbose = False,
eval_metric='AUC',
iterations=500,
thread_count = None,
random_state=SEED)
print cat.get_params()
{'iterations': 500, 'random_state': 42, 'verbose': False, 'eval_metric': 'AUC', 'loss_function': 'Logloss'}
For example, I'd like to know what learning_rate was used, but Ideally get the whole list.
You can try change your
print cat.get_params()
to
print cat.get_all_params()
Source: get_all_params documentation
You can find a detailed description of all training parameters with their default values here: https://catboost.ai/docs/concepts/python-reference_parameters-list.html#python-reference_parameters-list
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With