torch_mape

lightautoml.tasks.losses.torch.torch_mape(y_true, y_pred, sample_weight=None)[source]

Computes Mean Absolute Percentage Error.

Parameters
  • y_true (Tensor) – true target values.

  • y_pred (Tensor) – predicted target values.

  • sample_weight (Optional[Tensor]) – specify weighted mean.

Returns

metric value.