ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.2 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://catboost.ai/docs/en/concepts/python-reference_catboost_get_object_importance |
| Last Crawled | 2026-04-07 14:34:31 (4 days ago) |
| First Indexed | 2024-11-18 16:40:41 (1 year ago) |
| HTTP Status Code | 200 |
| Meta Title | get_object_importance | CatBoost |
| Meta Description | Calculate the effect of objects from the train dataset on the optimized metric values for the objects from the input dataset: |
| Meta Canonical | null |
| Boilerpipe Text | 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.
The higher the deviation from 0, the bigger the impact that an object has on the optimized metric.
The method is an implementation of the approach described in the
Finding Influential Training Samples for Gradient Boosted Decision Trees
paper .
Currently, object importance is supported only for the following loss functions.
Logloss
CrossEntropy
RMSE
MAE
Quantile
Expectile
LogLinQuantile
MAPE
Poisson
Method call format
get_object_importance(pool,
train_pool,
top_size=-
1
,
type
=
'Average'
,
update_method=
'SinglePoint'
,
importance_values_sign=
'All'
,
thread_count=-
1
,
verbose=
False
,
log_cout=sys.stdout,
log_cerr=sys.stderr)
Parameters
pool
Description
The data for calculating object importances.
Possible types
catboost.Pool
Default value
Required parameter
train_pool
Description
The dataset used for training.
Possible types
catboost.Pool
Default value
Required parameter
top_size
Description
Defines the number of most important objects from the training dataset. The number of returned objects is limited to this number.
Possible types
int
Default value
-1 (top size is not limited)
type
Description
The method for calculating the object importances.
Possible values:
Average — The average of scores of objects from the training dataset for every object from the input dataset.
PerObject — The scores of each object from the training dataset for each object from the input dataset.
Possible types
string
Default value
Average
update_method
Description
The algorithm accuracy method.
Possible values:
SinglePoint — The fastest and least accurate method.
TopKLeaves — Specify the number of leaves. The higher the value, the more accurate and the slower the calculation.
AllPoints — The slowest and most accurate method.
Supported parameters:
top
 — Defines the number of leaves to use for the TopKLeaves update method. See the
Finding Influential Training Samples for Gradient Boosted Decision Trees
for more details.
For example, the following value sets the method to TopKLeaves and limits the number of leaves to 3:
TopKLeaves:top=3
Possible types
string
Default value
SinglePoint
importance_values_sign
Description
Defines the type of effect that the objects from the training dataset must have on the optimized metric value for objects from the input dataset. Only the appropriate objects are output.
Possible values:
Positive
Negative
All
Possible types
string
Default value
All
thread_count
Description
The number of threads to use for operation.
Optimizes the speed of execution. This parameter doesn't affect results.
Possible types
int
Default value
-1 (the number of threads is equal to the number of processor cores)
log_cout
Output stream or callback for logging.
Possible types
callable Python object
python object providing the
write()
method
Default value
sys.stdout
log_cerr
Error stream or callback for logging.
Possible types
callable Python object
python object providing the
write()
method
Default value
sys.stderr
Type of return value
Two lists of lists with indices and scores.
For example, if the input dataset contains 3 rows and the training dataset contains 4 rows, the indices list takes the following structure:
[[1, 2, 3, 4], [4, 3, 2, 1], [1, 3, 4, 2]]
The scores list has the same structure with the corresponding scores instead of indices. |
| Markdown | [](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)
get\_object\_importance
## In this article:
- [Method call format](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#call-format)
- [Parameters](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#parameters)
- [pool](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#pool)
- [train\_pool](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#train_pool)
- [top\_size](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#top_size)
- [type](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#type)
- [update\_method](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#update_method)
- [importance\_values\_sign](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#importance_values_sign)
- [thread\_count](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#thread_count)
- [log\_cout](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#log_cout)
- [log\_cerr](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#log_cerr)
- [Type of return value](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#output-format)
1. Python package
2. [CatBoost](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost)
3. get\_object\_importance
# get\_object\_importance
- [Method call format](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#call-format)
- [Parameters](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#parameters)
- [pool](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#pool)
- [train\_pool](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#train_pool)
- [top\_size](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#top_size)
- [type](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#type)
- [update\_method](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#update_method)
- [importance\_values\_sign](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#importance_values_sign)
- [thread\_count](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#thread_count)
- [log\_cout](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#log_cout)
- [log\_cerr](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#log_cerr)
- [Type of return value](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_object_importance#output-format)
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.
The higher the deviation from 0, the bigger the impact that an object has on the optimized metric.
The method is an implementation of the approach described in the [Finding Influential Training Samples for Gradient Boosted Decision Trees](https://arxiv.org/abs/1802.06640) paper .
Currently, object importance is supported only for the following loss functions.
Logloss
CrossEntropy
RMSE
MAE
Quantile
Expectile
LogLinQuantile
MAPE
Poisson
## Method call format
```
get_object_importance(pool,
train_pool,
top_size=-1,
type='Average',
update_method='SinglePoint',
importance_values_sign='All',
thread_count=-1,
verbose=False,
log_cout=sys.stdout,
log_cerr=sys.stderr)
```
## Parameters
### pool
#### Description
The data for calculating object importances.
**Possible types**
catboost.Pool
**Default value**
Required parameter
### train\_pool
#### Description
The dataset used for training.
**Possible types**
catboost.Pool
**Default value**
Required parameter
### top\_size
#### Description
Defines the number of most important objects from the training dataset. The number of returned objects is limited to this number.
**Possible types**
int
**Default value**
\-1 (top size is not limited)
### type
#### Description
The method for calculating the object importances.
Possible values:
- Average — The average of scores of objects from the training dataset for every object from the input dataset.
- PerObject — The scores of each object from the training dataset for each object from the input dataset.
**Possible types**
string
**Default value**
Average
### update\_method
#### Description
The algorithm accuracy method.
Possible values:
- SinglePoint — The fastest and least accurate method.
- TopKLeaves — Specify the number of leaves. The higher the value, the more accurate and the slower the calculation.
- AllPoints — The slowest and most accurate method.
Supported parameters:
- `top` — Defines the number of leaves to use for the TopKLeaves update method. See the [Finding Influential Training Samples for Gradient Boosted Decision Trees](https://arxiv.org/abs/1802.06640) for more details.
For example, the following value sets the method to TopKLeaves and limits the number of leaves to 3:
```
TopKLeaves:top=3
```
**Possible types**
string
**Default value**
SinglePoint
### importance\_values\_sign
#### Description
Defines the type of effect that the objects from the training dataset must have on the optimized metric value for objects from the input dataset. Only the appropriate objects are output.
Possible values:
- Positive
- Negative
- All
**Possible types**
string
**Default value**
All
### thread\_count
#### Description
The number of threads to use for operation.
Optimizes the speed of execution. This parameter doesn't affect results.
**Possible types**
int
**Default value**
\-1 (the number of threads is equal to the number of processor cores)
### log\_cout
Output stream or callback for logging.
**Possible types**
- callable Python object
- python object providing the `write()` method
**Default value**
sys.stdout
### log\_cerr
Error stream or callback for logging.
**Possible types**
- callable Python object
- python object providing the `write()` method
**Default value**
sys.stderr
## Type of return value
Two lists of lists with indices and scores.
For example, if the input dataset contains 3 rows and the training dataset contains 4 rows, the indices list takes the following structure:
```
[[1, 2, 3, 4], [4, 3, 2, 1], [1, 3, 4, 2]]
```
The scores list has the same structure with the corresponding scores instead of indices.
### Was the article helpful?
Yes
No
Previous
[get\_metadata](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_metadata)
Next
[get\_param](https://catboost.ai/docs/en/concepts/en/concepts/python-reference_catboost_get_param)
 |
| Readable Markdown | 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.
The higher the deviation from 0, the bigger the impact that an object has on the optimized metric.
The method is an implementation of the approach described in the [Finding Influential Training Samples for Gradient Boosted Decision Trees](https://arxiv.org/abs/1802.06640) paper .
Currently, object importance is supported only for the following loss functions.
Logloss
CrossEntropy
RMSE
MAE
Quantile
Expectile
LogLinQuantile
MAPE
Poisson
## Method call format
```
get_object_importance(pool,
train_pool,
top_size=-1,
type='Average',
update_method='SinglePoint',
importance_values_sign='All',
thread_count=-1,
verbose=False,
log_cout=sys.stdout,
log_cerr=sys.stderr)
```
## Parameters
### pool
#### Description
The data for calculating object importances.
**Possible types**
catboost.Pool
**Default value**
Required parameter
### train\_pool
#### Description
The dataset used for training.
**Possible types**
catboost.Pool
**Default value**
Required parameter
### top\_size
#### Description
Defines the number of most important objects from the training dataset. The number of returned objects is limited to this number.
**Possible types**
int
**Default value**
\-1 (top size is not limited)
### type
#### Description
The method for calculating the object importances.
Possible values:
- Average — The average of scores of objects from the training dataset for every object from the input dataset.
- PerObject — The scores of each object from the training dataset for each object from the input dataset.
**Possible types**
string
**Default value**
Average
### update\_method
#### Description
The algorithm accuracy method.
Possible values:
- SinglePoint — The fastest and least accurate method.
- TopKLeaves — Specify the number of leaves. The higher the value, the more accurate and the slower the calculation.
- AllPoints — The slowest and most accurate method.
Supported parameters:
- `top` — Defines the number of leaves to use for the TopKLeaves update method. See the [Finding Influential Training Samples for Gradient Boosted Decision Trees](https://arxiv.org/abs/1802.06640) for more details.
For example, the following value sets the method to TopKLeaves and limits the number of leaves to 3:
```
TopKLeaves:top=3
```
**Possible types**
string
**Default value**
SinglePoint
### importance\_values\_sign
#### Description
Defines the type of effect that the objects from the training dataset must have on the optimized metric value for objects from the input dataset. Only the appropriate objects are output.
Possible values:
- Positive
- Negative
- All
**Possible types**
string
**Default value**
All
### thread\_count
#### Description
The number of threads to use for operation.
Optimizes the speed of execution. This parameter doesn't affect results.
**Possible types**
int
**Default value**
\-1 (the number of threads is equal to the number of processor cores)
### log\_cout
Output stream or callback for logging.
**Possible types**
- callable Python object
- python object providing the `write()` method
**Default value**
sys.stdout
### log\_cerr
Error stream or callback for logging.
**Possible types**
- callable Python object
- python object providing the `write()` method
**Default value**
sys.stderr
## Type of return value
Two lists of lists with indices and scores.
For example, if the input dataset contains 3 rows and the training dataset contains 4 rows, the indices list takes the following structure:
```
[[1, 2, 3, 4], [4, 3, 2, 1], [1, 3, 4, 2]]
```
The scores list has the same structure with the corresponding scores instead of indices. |
| Shard | 169 (laksa) |
| Root Hash | 17435841955170310369 |
| Unparsed URL | ai,catboost!/docs/en/concepts/python-reference_catboost_get_object_importance s443 |