Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Commit e2ac2f1

Browse files
FavioVazquezsrowen
authored andcommitted
[SPARK-21976][DOC] Fix wrong documentation for Mean Absolute Error.
## What changes were proposed in this pull request? Fixed wrong documentation for Mean Absolute Error. Even though the code is correct for the MAE: ```scala Since("1.2.0") def meanAbsoluteError: Double = { summary.normL1(1) / summary.count } ``` In the documentation the division by N is missing. ## How was this patch tested? All of spark tests were run. Please review http://spark.apache.org/contributing.html before opening a pull request. Author: FavioVazquez <[email protected]> Author: faviovazquez <[email protected]> Author: Favio André Vázquez <[email protected]> Closes apache#19190 from FavioVazquez/mae-fix.
1 parent dc74c0e commit e2ac2f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/mllib-evaluation-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ variable from a number of independent variables.
549549
</tr>
550550
<tr>
551551
<td>Mean Absolute Error (MAE)</td>
552-
<td>$MAE=\sum_{i=0}^{N-1} \left|\mathbf{y}_i - \hat{\mathbf{y}}_i\right|$</td>
552+
<td>$MAE=\frac{1}{N}\sum_{i=0}^{N-1} \left|\mathbf{y}_i - \hat{\mathbf{y}}_i\right|$</td>
553553
</tr>
554554
<tr>
555555
<td>Coefficient of Determination $(R^2)$</td>

0 commit comments

Comments
 (0)