如何返回 CatBoost 模型的所有超参数?
注意:我认为这不是Print CatBoost 超参数的重复,因为该问题/答案不能满足我的需求。
例如,使用 sklearn 我可以:
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)
这将返回所有超参数、我定义的超参数和其他默认值。
使用 Catboost 我可以使用 .get_params() 但它似乎只返回用户指定的参数:
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'}
例如,我想知道 learning_rate 使用了什么,但理想情况下得到整个列表。