class lightautoml.tasks.losses.cb.CBLoss(loss, loss_params=None, fw_func=None, bw_func=None)[source]

Bases: lightautoml.tasks.losses.base.Loss

Loss used for CatBoost.

__init__(loss, loss_params=None, fw_func=None, bw_func=None)[source]
  • loss (Union[str, Callable]) – String with one of default losses.

  • loss_params (Optional[Dict]) – additional loss parameters. Format like in lightautoml.tasks.custom_metrics.

  • fw_func (Optional[Callable]) – Forward transformation. Used for transformation of target and item weights.

  • bw_func (Optional[Callable]) – Backward transformation. Used for predict values transformation.

set_callback_metric(metric, greater_is_better=None, metric_params=None, task_name=None)[source]

Callback metric setter.

  • metric (Union[str, Callable]) – Callback metric.

  • greater_is_better (Optional[bool]) – Whether or not higher value is better.

  • metric_params (Optional[Dict]) – Additional metric parameters.

  • task_name (Optional[str]) – Name of task. For now it omitted.