Skip to content

Commit 05da8da

Browse files
author
GitName
committed
fix docstring
1 parent 2db5794 commit 05da8da

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Diff for: imblearn/metrics/_classification.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -1029,19 +1029,18 @@ def macro_averaged_mean_absolute_error(y_true, y_pred):
10291029
>>> import numpy as np
10301030
>>> from sklearn.metrics import mean_absolute_error
10311031
>>> from imblearn.metrics import macro_averaged_mean_absolute_error
1032-
>>> y_true_balanced = [1, 1, 1, 2, 2, 2]
1033-
>>> y_true_imbalanced = [1, 1, 1, 1, 1, 2]
1034-
>>> y_pred = [1, 2, 1, 2, 1, 2]
1035-
>>> np.round(mean_absolute_error(y_true_balanced, y_pred), 4)
1036-
0.3333
1037-
>>> np.round(mean_absolute_error(y_true_imbalanced, y_pred), 4)
1038-
0.3333
1039-
>>> np.round(macro_averaged_mean_absolute_error(y_true_balanced, y_pred),
1040-
4)
1041-
0.3333
1032+
>>> y_true_balanced = [1, 1, 2, 2]
1033+
>>> y_true_imbalanced = [1, 2, 2, 2]
1034+
>>> y_pred = [1, 2, 1, 2]
1035+
>>> mean_absolute_error(y_true_balanced, y_pred)
1036+
0.5
1037+
>>> mean_absolute_error(y_true_imbalanced, y_pred)
1038+
0.25
1039+
>>> macro_averaged_mean_absolute_error(y_true_balanced, y_pred)
1040+
0.5
10421041
>>> np.round(macro_averaged_mean_absolute_error(y_true_imbalanced, y_pred,
10431042
4)
1044-
0.2
1043+
0.1667
10451044
10461045
"""
10471046
all_mae = []

0 commit comments

Comments
 (0)