Repository: spark
Updated Branches:
refs/heads/branch-2.1 ae4e8ae41 -> e7696ebef
[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/e7696ebe
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e7696ebe
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e7696ebe
Branch: refs/heads/branch-2.1
Commit: e7696ebef5d6a298a16942f660555267df34eab9
Parents: ae4e8ae
Author: FavioVazquez <[email protected]>
Authored: Tue Sep 12 10:33:35 2017 +0100
Committer: Sean Owen <[email protected]>
Committed: Tue Sep 12 10:33:54 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/e7696ebe/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]