sign

sign(y_true: List[Union[float, List[float]]], y_pred: List[Union[float, List[float]]]) float[source]

Sign error metric.

\[Sign(y\_true, y\_pred) = \frac{1}{n}\cdot\sum_{i=0}^{n - 1}{sign(y\_true_i - y\_pred_i)}\]
Parameters
  • y_true (List[Union[float, List[float]]]) –

    array-like of shape (n_samples,) or (n_samples, n_outputs)

    Ground truth (correct) target values.

  • y_pred (List[Union[float, List[float]]]) –

    array-like of shape (n_samples,) or (n_samples, n_outputs)

    Estimated target values.

Returns

A floating point value (the best value is 0.0).

Return type

float