Sum models

Purpose

Blend trees and counters of two or more trained CatBoost models into a new model. Leaf values can be individually weighted for each input model. For example, it may be useful to blend models trained on different validation datasets.

Execution format

catboost model-sum -m [<model with 1.0 weight>] [--model-with-weight <path_to_model>=<weight>] -o <result model path>

Options

-m

Description

The path to the model that should be blended with the others. The weight of the leafs of this model is set to 1.

This parameter can be specified several times to set the required number of input models.

Default value

At least one of --m, -model-with-weight parameters should be set at least once.

--model-with-weight

Description

The path to the model that should be blended with the others. Use this parameter to set the individual weight for the leaf values of this model. Use the equal sign as the separator.

This parameter can be specified several times to set the required number of input models.

Default value

At least one of --m, -model-with-weight parameters should be set at least once.

-o

Description

The path to the output model obtained as the result of blending the input ones.

Default value

Required parameter

--ctr-merge-policy

Description

The counters merging policy. Possible values:

  • FailIfCtrIntersects — Ensure that the models have zero intersecting counters.
  • LeaveMostDiversifiedTable — Use the most diversified counters by the count of unique hash values.
  • IntersectingCountersAverage — Use the average ctr counter values in the intersecting bins.

Default value

IntersectingCountersAverage