šŸ•·ļø Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 169 (from laksa076)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ā„¹ļø Skipped - page is already crawled

šŸ“„
INDEXABLE
āœ…
CRAWLED
3 days ago
šŸ¤–
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.1 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://catboost.ai/docs/en/concepts/python-reference_catboost
Last Crawled2026-04-18 22:27:06 (3 days ago)
First Indexed2024-11-15 15:36:19 (1 year ago)
HTTP Status Code200
Meta TitleCatBoost | CatBoost
Meta Descriptionclass CatBoost (params= None ). Purpose. Training and applying models. Parameters params Description. The list of parameters to start training with.
Meta Canonicalnull
Boilerpipe Text
class CatBoost (params= None ) Purpose Training and applying models. Parameters params Description The list ofĀ  parameters to start training with. If omitted, default values are used. Note Some parameters duplicate the ones specified for theĀ  fit method. In these cases the values specified for theĀ  fit method take precedence. Possible types: dict Default value None Attributes tree_count_ Return the number of trees in the model. This number can differ from the value specified in theĀ  --iterations training parameter in the following cases: The training is stopped by the overfitting detector . TheĀ  --use-best-model training parameter is set to True . feature_importances_ Return the calculated feature importances . The output data depends on the type of the model's loss function: Non-ranking loss functions — PredictionValuesChange Ranking loss functions — LossFunctionChange random_seed_ The random seed used for training. learning_rate_ The learning rate used for training. feature_names_ The names of features in the dataset. evals_result_ Return the values of metrics calculated during the training. best_score_ Return the best result for each metric calculated on each validation dataset. best_iteration_ Return the identifier of the iteration with the best result of the evaluation metric or loss function on the last validation set. classes_ Return the names of classes for classification models. An empty list is returned for all other models. The order of classes in this list corresponds to the order of classes in resulting predictions. Methods fit Train a model. predict Apply the model to the given dataset. calc_feature_statistics Calculate and plot a set of statistics for the chosen feature. calc_leaf_indexes Returns indexes of leafs to which objects from pool are mapped by model trees. compare Draw train and evaluation metrics in Jupyter Notebook for two trained models. copy Copy theĀ CatBoost object. eval_metrics Calculate the specified metrics for the specified dataset. get_all_params Return the values of all training parameters (including the ones that are not explicitly specified by users). get_best_iteration Return the identifier of the iteration with the best result of the evaluation metric or loss function on the last validation set. get_best_score Return the best result for each metric calculated on each validation dataset. get_borders Return the list of borders for numerical features. get_evals_result Return the values of metrics calculated during the training. get_feature_importance Calculate and return theĀ  feature importances . get_metadata Return a proxy object with metadata from the model's internal key-value string storage. get_object_importance Calculate the effect of objects from the train dataset on the optimized metric values for the objects from the input dataset: Positive values reflect that the optimized metric increases. Negative values reflect that the optimized metric decreases. get_param Return the value of the given parameter if it is explicitly by the user before starting the training. If this parameter is used with the default value, this function returns None. get_params Return the values of training parameters that are explicitly specified by the user. If all parameters are used with their default values, this function returns an empty dict. get_scale_and_bias Return the scale and bias of the model. These values affect the results of applying the model, since the model prediction results are calculated as follows: āˆ‘ l e a f _ v a l u e s ā‹… s c a l e + b i a s \sum leaf\_values \cdot scale + bias get_test_eval Return the formula values that were calculated for the objects from the validation dataset provided for training. grid_search A simple grid search over specified parameter values for a model. load_model Load the model from a file. plot_predictions Sequentially vary the value of the specified features to put them into all buckets and calculate predictions for the input objects accordingly. plot_tree Visualize theĀ CatBoost decision trees. randomized_search A simple randomized search on hyperparameters. save_borders Save the model borders to a file. save_model Save the model to a file. select_features Select the best features from the dataset using the Recursive Feature Elimination algorithm. set_feature_names Set names for all features in the model. set_params Set the training parameters. set_scale_and_bias Set the scale and bias. shrink Shrink the model. Only trees with indices from the range [ntree_start, ntree_end) are kept. staged_predict Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range [0; i).
Markdown
[![Logo icon](https://yastatic.net/s3/locdoc/daas-static/catboost/71b237a322eec6f2889af0dae2a9c549.svg)](https://catboost.ai/ "CatBoost") - Installation - [Overview](https://catboost.ai/docs/en/concepts/en/concepts/installation) - Python package installation - CatBoost for Apache Spark installation - R package installation - Command-line version binary - Build from source - Key Features - Training parameters - Python package - [Quick start](https://catboost.ai/docs/en/concepts/en/concepts/python-quickstart) - CatBoost - [Overview](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost) - [fit](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_fit) - [predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_predict) - [Attributes](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes) - [calc\_leaf\_indexes](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_calc_leaf_indexes) - [calc\_feature\_statistics](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_calc_feature_statistics) - [compare](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_modelcompare) - [copy](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_copy) - [eval\_metrics](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_eval-metrics) - [get\_all\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_all_params) - [get\_best\_iteration](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_best_iteration) - [get\_best\_score](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_best_score) - [get\_borders](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_borders) - [get\_evals\_result](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_evals_result) - get\_feature\_importance - [get\_metadata](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_metadata) - [get\_object\_importance](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance) - [get\_param](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_param) - [get\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_params) - [get\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_scale_and_bias) - [get\_test\_eval](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_test_eval) - [grid\_search](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_grid_search) - [is\_fitted](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_is_fitted) - [load\_model](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_load_model) - [plot\_predictions](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_plot_predictions) - [plot\_tree](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_plot_tree) - [randomized\_search](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_randomized_search) - [save\_model](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_save_model) - [save\_borders](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_save_borders) - [select\_features](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_select_features) - [set\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_set_scale_and_bias) - [set\_feature\_names](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_set_feature_names) - [set\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_set_params) - [shrink](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_shrink) - [staged\_predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_staged_predict) - [virtual\_ensembles\_predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_virtual_ensembles_predict) - CatBoostClassifier - CatBoostRanker - CatBoostRegressor - [cv](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_cv) - datasets - FeaturesData - MetricVisualizer - Pool - [sample\_gaussian\_process](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_sample_gaussian_process) - [sum\_models](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_sum_models) - [to\_classifier](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_to_classifier) - [to\_regressor](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_to_regressor) - [train](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_train) - Text processing - utils - [Usage examples](https://catboost.ai/docs/en/concepts/en/concepts/python-usages-examples) - CatBoost for Apache Spark - R package - Command-line version - Applying models - Objectives and metrics - Model analysis - Data format description - [Parameter tuning](https://catboost.ai/docs/en/concepts/en/concepts/parameter-tuning) - [Speeding up the training](https://catboost.ai/docs/en/concepts/en/concepts/speed-up-training) - Data visualization - Algorithm details - [FAQ](https://catboost.ai/docs/en/concepts/en/concepts/faq) - Educational materials - [Development and contributions](https://catboost.ai/docs/en/concepts/en/concepts/development-and-contributions) - [Contacts](https://catboost.ai/docs/en/concepts/en/concepts/contacts) CatBoost ## In this article: - [Purpose](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#purpose) - [Parameters](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#parameters) - [params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#params) - [Attributes](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#attributes) - [tree\_count\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#tree_count_) - [feature\_importances\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#feature_importances_) - [random\_seed\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#random_seed_) - [learning\_rate\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#learning_rate_) - [feature\_names\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#feature_names_) - [evals\_result\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#evals_result_) - [best\_score\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#best_score_) - [best\_iteration\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#best_iteration_) - [classes\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#classes_) - [Methods](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#methods) - [fit](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#fit) - [predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#predict) - [calc\_feature\_statistics](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#calc_feature_statistics) - [calc\_leaf\_indexes](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#calc_leaf_indexes) - [compare](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#compare) - [copy](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#copy) - [eval\_metrics](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#eval_metrics) - [get\_all\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_all_params) - [get\_best\_iteration](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_best_iteration) - [get\_best\_score](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_best_score) - [get\_borders](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_borders) - [get\_evals\_result](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_evals_result) - [get\_feature\_importance](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_feature_importance) - [get\_metadata](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_metadata) - [get\_object\_importance](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_object_importance) - [get\_param](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_param) - [get\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_params) - [get\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_scale_and_bias) - [get\_test\_eval](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_test_eval) - [grid\_search](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#grid_search) - [load\_model](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#load_model) - [plot\_predictions](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#plot_predictions) - [plot\_tree](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#plot_tree) - [randomized\_search](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#randomized_search) - [save\_borders](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#save_borders) - [save\_model](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#save_model) - [select\_features](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#select_features) - [set\_feature\_names](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#set_feature_names) - [set\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#set_params) - [set\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#set_scale_and_bias) - [shrink](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#shrink) - [staged\_predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#staged_predict) 1. Python package 2. CatBoost 3. Overview # CatBoost - [Purpose](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#purpose) - [Parameters](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#parameters) - [params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#params) - [Attributes](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#attributes) - [tree\_count\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#tree_count_) - [feature\_importances\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#feature_importances_) - [random\_seed\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#random_seed_) - [learning\_rate\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#learning_rate_) - [feature\_names\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#feature_names_) - [evals\_result\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#evals_result_) - [best\_score\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#best_score_) - [best\_iteration\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#best_iteration_) - [classes\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#classes_) - [Methods](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#methods) - [fit](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#fit) - [predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#predict) - [calc\_feature\_statistics](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#calc_feature_statistics) - [calc\_leaf\_indexes](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#calc_leaf_indexes) - [compare](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#compare) - [copy](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#copy) - [eval\_metrics](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#eval_metrics) - [get\_all\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_all_params) - [get\_best\_iteration](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_best_iteration) - [get\_best\_score](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_best_score) - [get\_borders](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_borders) - [get\_evals\_result](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_evals_result) - [get\_feature\_importance](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_feature_importance) - [get\_metadata](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_metadata) - [get\_object\_importance](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_object_importance) - [get\_param](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_param) - [get\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_params) - [get\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_scale_and_bias) - [get\_test\_eval](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#get_test_eval) - [grid\_search](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#grid_search) - [load\_model](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#load_model) - [plot\_predictions](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#plot_predictions) - [plot\_tree](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#plot_tree) - [randomized\_search](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#randomized_search) - [save\_borders](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#save_borders) - [save\_model](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#save_model) - [select\_features](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#select_features) - [set\_feature\_names](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#set_feature_names) - [set\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#set_params) - [set\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#set_scale_and_bias) - [shrink](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#shrink) - [staged\_predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost#staged_predict) ``` class CatBoost(params=None) ``` ## Purpose Training and applying models. ## Parameters ### params #### Description The list of [parameters](https://catboost.ai/docs/en/concepts/en/references/training-parameters/) to start training with. If omitted, default values are used. Note Some parameters duplicate the ones specified for the [fit](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_fit) method. In these cases the values specified for the [fit](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_fit) method take precedence. **Possible types:** `dict` **Default value** `None` ## Attributes ### [tree\_count\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#tree_count) Return the number of trees in the model. This number can differ from the value specified in the `--iterations` training parameter in the following cases: - The training is stopped by the [overfitting detector](https://catboost.ai/docs/en/concepts/en/concepts/overfitting-detector). - The `--use-best-model` training parameter is set to "True". ### [feature\_importances\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#feature_importances) Return the calculated [feature importances](https://catboost.ai/docs/en/concepts/en/concepts/fstr). The output data depends on the type of the model's loss function: - Non-ranking loss functions — [PredictionValuesChange](https://catboost.ai/docs/en/concepts/en/concepts/fstr#regular-feature-importance) - Ranking loss functions — [LossFunctionChange](https://catboost.ai/docs/en/concepts/en/concepts/fstr#regular-feature-importances__lossfunctionchange) ### [random\_seed\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#random_seed) The random seed used for training. ### [learning\_rate\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#learning_rate) The learning rate used for training. ### [feature\_names\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#feature_names) The names of features in the dataset. ### [evals\_result\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#evals_result) Return the values of metrics calculated during the training. ### [best\_score\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#best_score#best_score) Return the best result for each metric calculated on each validation dataset. ### [best\_iteration\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#best_iteration) Return the identifier of the iteration with the best result of the evaluation metric or loss function on the last validation set. ### [classes\_](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_attributes#classes) Return the names of classes for classification models. An empty list is returned for all other models. The order of classes in this list corresponds to the order of classes in resulting predictions. ## Methods ### [fit](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_fit) Train a model. ### [predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_predict) Apply the model to the given dataset. ### [calc\_feature\_statistics](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_calc_feature_statistics) Calculate and plot a set of statistics for the chosen feature. ### [calc\_leaf\_indexes](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_calc_leaf_indexes) Returns indexes of leafs to which objects from pool are mapped by model trees. ### [compare](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_modelcompare) Draw train and evaluation metrics in [Jupyter Notebook](https://catboost.ai/docs/en/concepts/en/features/visualization_jupyter-notebook) for two trained models. ### [copy](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_copy) Copy the CatBoost object. ### [eval\_metrics](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_eval-metrics) Calculate the specified metrics for the specified dataset. ### [get\_all\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_all_params) Return the values of all training parameters (including the ones that are not explicitly specified by users). ### [get\_best\_iteration](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_best_iteration) Return the identifier of the iteration with the best result of the evaluation metric or loss function on the last validation set. ### [get\_best\_score](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_best_score) Return the best result for each metric calculated on each validation dataset. ### [get\_borders](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_borders) Return the list of borders for numerical features. ### [get\_evals\_result](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_evals_result) Return the values of metrics calculated during the training. ### [get\_feature\_importance](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_feature_importance) Calculate and return the [feature importances](https://catboost.ai/docs/en/concepts/en/concepts/fstr). ### [get\_metadata](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_metadata) Return a proxy object with metadata from the model's internal key-value string storage. ### [get\_object\_importance](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance) Calculate the effect of objects from the train dataset on the optimized metric values for the objects from the input dataset: - Positive values reflect that the optimized metric increases. - Negative values reflect that the optimized metric decreases. ### [get\_param](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_param) Return the value of the given parameter if it is explicitly by the user before starting the training. If this parameter is used with the default value, this function returns None. ### [get\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_params) Return the values of training parameters that are explicitly specified by the user. If all parameters are used with their default values, this function returns an empty dict. ### [get\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_scale_and_bias) Return the scale and bias of the model. These values affect the results of applying the model, since the model prediction results are calculated as follows: āˆ‘ l e a f \_ v a l u e s ā‹… s c a l e \+ b i a s \\sum leaf\\\_values \\cdot scale + bias āˆ‘leaf\_valuesā‹…scale\+bias ### [get\_test\_eval](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_test_eval) Return the formula values that were calculated for the objects from the validation dataset provided for training. ### [grid\_search](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_grid_search) A simple grid search over specified parameter values for a model. ### [load\_model](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_load_model) Load the model from a file. ### [plot\_predictions](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_plot_predictions) Sequentially vary the value of the specified features to put them into all buckets and calculate predictions for the input objects accordingly. ### [plot\_tree](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_plot_tree) Visualize the CatBoost decision trees. ### [randomized\_search](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_randomized_search) A simple randomized search on hyperparameters. ### [save\_borders](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_save_borders) Save the model borders to a file. ### [save\_model](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_save_model) Save the model to a file. ### [select\_features](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_select_features) Select the best features from the dataset using the [Recursive Feature Elimination](https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.RFE.html) algorithm. ### [set\_feature\_names](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_set_feature_names) Set names for all features in the model. ### [set\_params](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_set_params) Set the training parameters. ### [set\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_set_scale_and_bias) Set the scale and bias. ### [shrink](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_shrink) Shrink the model. Only trees with indices from the range `[ntree_start, ntree_end)` are kept. ### [staged\_predict](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_staged_predict) Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range \[0; i). ### Was the article helpful? Yes No Previous [Quick start](https://catboost.ai/docs/en/concepts/en/concepts/python-quickstart) Next [fit](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_fit) ![](https://mc.yandex.ru/watch/60763294)
Readable Markdown
``` class CatBoost(params=None) ``` ## Purpose Training and applying models. ## Parameters ### params #### Description The list of [parameters](https://catboost.ai/docs/en/references/training-parameters/) to start training with. If omitted, default values are used. Note Some parameters duplicate the ones specified for the [fit](https://catboost.ai/docs/en/concepts/python-reference_catboost_fit) method. In these cases the values specified for the [fit](https://catboost.ai/docs/en/concepts/python-reference_catboost_fit) method take precedence. **Possible types:** `dict` **Default value** `None` ## Attributes ### [tree\_count\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#tree_count) Return the number of trees in the model. This number can differ from the value specified in the `--iterations` training parameter in the following cases: - The training is stopped by the [overfitting detector](https://catboost.ai/docs/en/concepts/overfitting-detector). - The `--use-best-model` training parameter is set to "True". ### [feature\_importances\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#feature_importances) Return the calculated [feature importances](https://catboost.ai/docs/en/concepts/fstr). The output data depends on the type of the model's loss function: - Non-ranking loss functions — [PredictionValuesChange](https://catboost.ai/docs/en/concepts/fstr#regular-feature-importance) - Ranking loss functions — [LossFunctionChange](https://catboost.ai/docs/en/concepts/fstr#regular-feature-importances__lossfunctionchange) ### [random\_seed\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#random_seed) The random seed used for training. ### [learning\_rate\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#learning_rate) The learning rate used for training. ### [feature\_names\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#feature_names) The names of features in the dataset. ### [evals\_result\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#evals_result) Return the values of metrics calculated during the training. ### [best\_score\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#best_score#best_score) Return the best result for each metric calculated on each validation dataset. ### [best\_iteration\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#best_iteration) Return the identifier of the iteration with the best result of the evaluation metric or loss function on the last validation set. ### [classes\_](https://catboost.ai/docs/en/concepts/python-reference_catboost_attributes#classes) Return the names of classes for classification models. An empty list is returned for all other models. The order of classes in this list corresponds to the order of classes in resulting predictions. ## Methods ### [fit](https://catboost.ai/docs/en/concepts/python-reference_catboost_fit) Train a model. ### [predict](https://catboost.ai/docs/en/concepts/python-reference_catboost_predict) Apply the model to the given dataset. ### [calc\_feature\_statistics](https://catboost.ai/docs/en/concepts/python-reference_catboost_calc_feature_statistics) Calculate and plot a set of statistics for the chosen feature. ### [calc\_leaf\_indexes](https://catboost.ai/docs/en/concepts/python-reference_catboost_calc_leaf_indexes) Returns indexes of leafs to which objects from pool are mapped by model trees. ### [compare](https://catboost.ai/docs/en/concepts/python-reference_catboost_modelcompare) Draw train and evaluation metrics in [Jupyter Notebook](https://catboost.ai/docs/en/features/visualization_jupyter-notebook) for two trained models. ### [copy](https://catboost.ai/docs/en/concepts/python-reference_catboost_copy) Copy the CatBoost object. ### [eval\_metrics](https://catboost.ai/docs/en/concepts/python-reference_catboost_eval-metrics) Calculate the specified metrics for the specified dataset. ### [get\_all\_params](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_all_params) Return the values of all training parameters (including the ones that are not explicitly specified by users). ### [get\_best\_iteration](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_best_iteration) Return the identifier of the iteration with the best result of the evaluation metric or loss function on the last validation set. ### [get\_best\_score](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_best_score) Return the best result for each metric calculated on each validation dataset. ### [get\_borders](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_borders) Return the list of borders for numerical features. ### [get\_evals\_result](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_evals_result) Return the values of metrics calculated during the training. ### [get\_feature\_importance](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_feature_importance) Calculate and return the [feature importances](https://catboost.ai/docs/en/concepts/fstr). ### [get\_metadata](https://catboost.ai/docs/en/concepts/python-reference_catboost_metadata) Return a proxy object with metadata from the model's internal key-value string storage. ### [get\_object\_importance](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_object_importance) Calculate the effect of objects from the train dataset on the optimized metric values for the objects from the input dataset: - Positive values reflect that the optimized metric increases. - Negative values reflect that the optimized metric decreases. ### [get\_param](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_param) Return the value of the given parameter if it is explicitly by the user before starting the training. If this parameter is used with the default value, this function returns None. ### [get\_params](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_params) Return the values of training parameters that are explicitly specified by the user. If all parameters are used with their default values, this function returns an empty dict. ### [get\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_scale_and_bias) Return the scale and bias of the model. These values affect the results of applying the model, since the model prediction results are calculated as follows: āˆ‘ l e a f \_ v a l u e s ā‹… s c a l e \+ b i a s \\sum leaf\\\_values \\cdot scale + bias ### [get\_test\_eval](https://catboost.ai/docs/en/concepts/python-reference_catboost_get_test_eval) Return the formula values that were calculated for the objects from the validation dataset provided for training. ### [grid\_search](https://catboost.ai/docs/en/concepts/python-reference_catboost_grid_search) A simple grid search over specified parameter values for a model. ### [load\_model](https://catboost.ai/docs/en/concepts/python-reference_catboost_load_model) Load the model from a file. ### [plot\_predictions](https://catboost.ai/docs/en/concepts/python-reference_catboost_plot_predictions) Sequentially vary the value of the specified features to put them into all buckets and calculate predictions for the input objects accordingly. ### [plot\_tree](https://catboost.ai/docs/en/concepts/python-reference_catboost_plot_tree) Visualize the CatBoost decision trees. ### [randomized\_search](https://catboost.ai/docs/en/concepts/python-reference_catboost_randomized_search) A simple randomized search on hyperparameters. ### [save\_borders](https://catboost.ai/docs/en/concepts/python-reference_catboost_save_borders) Save the model borders to a file. ### [save\_model](https://catboost.ai/docs/en/concepts/python-reference_catboost_save_model) Save the model to a file. ### [select\_features](https://catboost.ai/docs/en/concepts/python-reference_catboost_select_features) Select the best features from the dataset using the [Recursive Feature Elimination](https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.RFE.html) algorithm. ### [set\_feature\_names](https://catboost.ai/docs/en/concepts/python-reference_catboost_set_feature_names) Set names for all features in the model. ### [set\_params](https://catboost.ai/docs/en/concepts/python-reference_catboost_set_params) Set the training parameters. ### [set\_scale\_and\_bias](https://catboost.ai/docs/en/concepts/python-reference_catboost_set_scale_and_bias) Set the scale and bias. ### [shrink](https://catboost.ai/docs/en/concepts/python-reference_catboost_shrink) Shrink the model. Only trees with indices from the range `[ntree_start, ntree_end)` are kept. ### [staged\_predict](https://catboost.ai/docs/en/concepts/python-reference_catboost_staged_predict) Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range \[0; i).
Shard169 (laksa)
Root Hash17435841955170310369
Unparsed URLai,catboost!/docs/en/concepts/python-reference_catboost s443