Skip to main content

automl.spark.metrics

spark_metric_loss_score

def spark_metric_loss_score(metric_name: str, y_predict: psSeries, y_true: psSeries, sample_weight: psSeries = None, groups: psSeries = None) -> float

Compute the loss score of a metric for spark models.

Arguments:

  • metric_name - str | the name of the metric.
  • y_predict - psSeries | the predicted values.
  • y_true - psSeries | the true values.
  • sample_weight - psSeries | the sample weights. Default: None.
  • groups - psSeries | the group of each row. Default: None.

Returns:

float | the loss score. A lower value indicates a better model.