Repository: spark
Updated Branches:
refs/heads/branch-2.2 b1b5a7fdc -> 10c68366e
[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 #19190 from FavioVazquez/mae-fix.
(cherry picked from commit e2ac2f1c71a0f8b03743d0d916dc0ef28482a393)
Signed-off-by: Sean Owen <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/10c68366
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/10c68366
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/10c68366
Branch: refs/heads/branch-2.2
Commit: 10c68366e5474f131f7ea294e6abee4e02fca9f3
Parents: b1b5a7f
Author: FavioVazquez <[email protected]>
Authored: Tue Sep 12 10:33:35 2017 +0100
Committer: Sean Owen <[email protected]>
Committed: Tue Sep 12 10:33:43 2017 +0100
----------------------------------------------------------------------
docs/mllib-evaluation-metrics.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/10c68366/docs/mllib-evaluation-metrics.md
----------------------------------------------------------------------
diff --git a/docs/mllib-evaluation-metrics.md b/docs/mllib-evaluation-metrics.md
index ac82f43..7f27754 100644
--- a/docs/mllib-evaluation-metrics.md
+++ b/docs/mllib-evaluation-metrics.md
@@ -549,7 +549,7 @@ variable from a number of independent variables.
</tr>
<tr>
<td>Mean Absolute Error (MAE)</td>
- <td>$MAE=\sum_{i=0}^{N-1} \left|\mathbf{y}_i -
\hat{\mathbf{y}}_i\right|$</td>
+ <td>$MAE=\frac{1}{N}\sum_{i=0}^{N-1} \left|\mathbf{y}_i -
\hat{\mathbf{y}}_i\right|$</td>
</tr>
<tr>
<td>Coefficient of Determination $(R^2)$</td>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]