mean_absolute_percentage_error
- pmrf.math.losses.mean_absolute_percentage_error(y_true: Array, y_pred: Array, sample_weight: Array | None = None, multioutput: str | Array | Callable = 'uniform_average') Array
Computes the Mean Absolute Percentage Error (MAPE) between true and predicted values.
- Parameters:
y_true (jnp.ndarray) – Ground truth (correct) target values.
y_pred (jnp.ndarray) – Estimated target values.
sample_weight (jnp.ndarray, optional) – Optional array of weights for each sample.
multioutput (str, jnp.ndarray, or Callable, default='uniform_average') – Defines aggregating of multiple output values. Can be ‘uniform_average’, ‘raw_values’, ‘geometric_mean’, ‘convolution’, or a callable.
- Returns:
The calculated aggregated loss.
- Return type:
jnp.ndarray