catboost.get_feature_importance

catboost.get_feature_importance(model, 
                                pool = NULL, 
                                fstr_type = "FeatureImportance",
                                thread_count = -1)

Purpose

Calculate the feature importances (Feature importance and Feature interaction strength).

Arguments

ArgumentDescriptionDefault value
model

The model obtained as the result of training.

Required argument
poolThe input dataset.

The feature importance for the training dataset is calculated if this argument is not specified.

NULL
thread_count

The number of threads to use during training.

Optimizes the speed of execution. This parameter doesn't affect results.

-1 (the number of threads is equal to the number of cores) (The number of processor cores)
fstr_type

The type of feature importance to calculate.

Possible values:
  • FeatureImportance: The individual importance values for each of the input features.

  • ShapValues: A vector with contributions of each feature to the prediction for every input object and the expected value of the model prediction for the object (average prediction given no knowledge about the object).
  • Interaction: The value of the feature interaction strength for each pair of features.

FeatureImportance