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:
leaf_valuesscale+bias\sum leaf\_values \cdot scale + bias

Method call format

get_scale_and_bias()

Type of return value

tuple

Examples

from catboost import CatBoostClassifier, Pool
import numpy as np

train_data = Pool(data=[[1, 4, 5, 6],
                        [4, 5, 6, 7],
                        [30, 40, 50, 60]],
                  label=[1, 1, -1],
                  weight=[0.1, 0.2, 0.3])

model = CatBoostClassifier()

print(model.get_scale_and_bias())

The output of this example:

(1.0, 0.0)