diff --git a/src/TreeClassification.cpp b/src/TreeClassification.cpp index 6718fcc2..b3036ce1 100644 --- a/src/TreeClassification.cpp +++ b/src/TreeClassification.cpp @@ -57,11 +57,10 @@ case SPLIT_GINI: { vec y_i = y_node.unsafe_col(y_col_split); - result = compute_gini(y_i, w_node, g_node); // gini index: lower is better, so // transform to make consistent with other stats - result = (result-1) * -1; + result = 1 - compute_gini(y_i, w_node, g_node); break; }