From ac285245132d579e3499aff5bbabb9ff9050ad14 Mon Sep 17 00:00:00 2001 From: Aashil Patel Date: Sun, 19 Feb 2017 14:45:31 -0500 Subject: [PATCH 1/2] Add MAE formula in the regression criteria docs. Location: doc/modules/tree.rst --- doc/modules/tree.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/modules/tree.rst b/doc/modules/tree.rst index f53069782fec9..7900af1eb1173 100644 --- a/doc/modules/tree.rst +++ b/doc/modules/tree.rst @@ -486,8 +486,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, a common -criterion to minimise is the Mean Squared Error +representing a region :math:`R_m` with :math:`N_m` observations, common +criteria to minimise are + +Mean Squared Error: .. math:: @@ -495,6 +497,14 @@ criterion to minimise is the Mean Squared Error H(X_m) = \frac{1}{N_m} \sum_{i \in N_m} (y_i - c_m)^2 +Mean Absolute Error: + +.. math:: + + c_m = \frac{1}{N_m} \sum_{i \in N_m} y_i + + H(X_m) = \frac{1}{N_m} \sum_{i \in N_m} |y_i - c_m| + where :math:`X_m` is the training data in node :math:`m` .. topic:: References: From 91882bba7172c430414ee86c64124761517ceae0 Mon Sep 17 00:00:00 2001 From: Aashil Patel Date: Mon, 20 Feb 2017 12:51:22 -0500 Subject: [PATCH 2/2] Change c_m in the MAE formula to \bar{y_m} --- doc/modules/tree.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/modules/tree.rst b/doc/modules/tree.rst index 7900af1eb1173..8ea7ac85b42eb 100644 --- a/doc/modules/tree.rst +++ b/doc/modules/tree.rst @@ -501,9 +501,9 @@ Mean Absolute Error: .. math:: - c_m = \frac{1}{N_m} \sum_{i \in N_m} y_i + \bar{y_m} = \frac{1}{N_m} \sum_{i \in N_m} y_i - H(X_m) = \frac{1}{N_m} \sum_{i \in N_m} |y_i - c_m| + H(X_m) = \frac{1}{N_m} \sum_{i \in N_m} |y_i - \bar{y_m}| where :math:`X_m` is the training data in node :math:`m`