Skip to content

Commit

Permalink
[MRG] Add Explanation of MSE vs Friedman MSE vs MAE criterion in Regr…
Browse files Browse the repository at this point in the history
…ession Tree Building (#9367)

* clarified documentation for regression tree criterion

* added explanation on doc/modules/tree.rst
  • Loading branch information
warut-vijit authored and jmschrei committed Jul 17, 2017
1 parent 2a1d8ba commit 8485d3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion doc/modules/tree.rst
Expand Up @@ -481,7 +481,10 @@ Regression criteria

If the target is a continuous value, then for node :math:`m`,
representing a region :math:`R_m` with :math:`N_m` observations, common
criteria to minimise are
criteria to minimise as for determining locations for future
splits are Mean Squared Error, which minimizes the L2 error
using mean values at terminal nodes, and Mean Absolute Error, which
minimizes the L1 error using median values at terminal nodes.

Mean Squared Error:

Expand Down
7 changes: 5 additions & 2 deletions sklearn/tree/tree.py
Expand Up @@ -879,8 +879,11 @@ class DecisionTreeRegressor(BaseDecisionTree, RegressorMixin):
criterion : string, optional (default="mse")
The function to measure the quality of a split. Supported criteria
are "mse" for the mean squared error, which is equal to variance
reduction as feature selection criterion, and "mae" for the mean
absolute error.
reduction as feature selection criterion and minimizes the L2 loss
using the mean of each terminal node, "friedman_mse", which uses mean
squared error with Friedman's improvement score for potential splits,
and "mae" for the mean absolute error, which minimizes the L1 loss
using the median of each terminal node.
.. versionadded:: 0.18
Mean Absolute Error (MAE) criterion.
Expand Down

0 comments on commit 8485d3e

Please sign in to comment.