Repository: spark
Updated Branches:
  refs/heads/master dc74c0e67 -> e2ac2f1c7


[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 <favio.vazqu...@gmail.com>
Author: faviovazquez <favio.vazqu...@gmail.com>
Author: Favio André Vázquez <favio.vazqu...@gmail.com>

Closes #19190 from FavioVazquez/mae-fix.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e2ac2f1c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e2ac2f1c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e2ac2f1c

Branch: refs/heads/master
Commit: e2ac2f1c71a0f8b03743d0d916dc0ef28482a393
Parents: dc74c0e
Author: FavioVazquez <favio.vazqu...@gmail.com>
Authored: Tue Sep 12 10:33:35 2017 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Tue Sep 12 10:33:35 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/e2ac2f1c/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: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to