Catboost 默认超参数

ADJ*_*ADJ 3 python machine-learning catboost

如何返回 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)
Run Code Online (Sandbox Code Playgroud)

这将返回所有超参数,我定义的参数和其他默认值。

使用 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'}
Run Code Online (Sandbox Code Playgroud)

例如,我想知道使用了什么 learning_rate,但理想情况下可以获取整个列表。

Ral*_*int 5

你可以尝试改变你的

print cat.get_params()
Run Code Online (Sandbox Code Playgroud)

print cat.get_all_params()
Run Code Online (Sandbox Code Playgroud)

来源:get_all_params 文档


Rob*_*cok 2

您可以在此处找到所有训练参数及其默认值的详细说明:https ://catboost.ai/docs/concepts/python-reference_parameters-list.html#python-reference_parameters-list