You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just traced through the code and found that the splitting algorithm may not yield the best result.
This is the original code in TreeClassification::findBestSplitValueSmallQ:
You can see that the class counts are squared, while only divided by n_right (or n_left) once. This is kind of like the Gini Impurity but not exactly the same. I’m not sure but I think this may lead to a suboptimal split. The problem can also be seen in other findBestSplit functions as well as addGiniImportance.
Below is my revised version for your reference:
Thanks. I'm pretty sure that the calculation is correct. Note that some terms cancel out and we don't need all terms for optimization (hence we calculate those only for the impurity importance).
Hi:
I just traced through the code and found that the splitting algorithm may not yield the best result.
This is the original code in
TreeClassification::findBestSplitValueSmallQ
:You can see that the class counts are squared, while only divided by n_right (or n_left) once. This is kind of like the Gini Impurity but not exactly the same. I’m not sure but I think this may lead to a suboptimal split. The problem can also be seen in other findBestSplit functions as well as addGiniImportance.
Below is my revised version for your reference:
The text was updated successfully, but these errors were encountered: