Skip to content

Commit

Permalink
[SPARK-21976][DOC] Fix wrong documentation for Mean Absolute Error.
Browse files Browse the repository at this point in the history
## 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 e2ac2f1)
Signed-off-by: Sean Owen <[email protected]>
  • Loading branch information
FavioVazquez authored and srowen committed Sep 12, 2017
1 parent ae4e8ae commit e7696eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/mllib-evaluation-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit e7696eb

Please sign in to comment.