sign¶
- sign(y_true: Union[float, Sequence[float], Sequence[Sequence[float]]], y_pred: Union[float, Sequence[float], Sequence[Sequence[float]]], multioutput: str = 'joint') Union[float, Sequence[float], Sequence[Sequence[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 (Union[float, Sequence[float], Sequence[Sequence[float]]]) –
array-like of shape (n_samples,) or (n_samples, n_outputs)
Ground truth (correct) target values.
y_pred (Union[float, Sequence[float], Sequence[Sequence[float]]]) –
array-like of shape (n_samples,) or (n_samples, n_outputs)
Estimated target values.
multioutput (str) – Defines aggregating of multiple output values (see
FunctionalMetricMultioutput
).
- Returns
A floating point value, or an array of floating point values, one for each individual target.
- Return type
Union[float, Sequence[float], Sequence[Sequence[float]]]