crflynn / skranger

scikit-learn compatible Python bindings for ranger C++ random forest library
https://skranger.readthedocs.io/en/stable/
GNU General Public License v3.0
51 stars 7 forks source link

fix value for classifier #116

Closed crflynn closed 2 years ago

crflynn commented 2 years ago

Fixes https://github.com/crflynn/skranger/issues/66#issuecomment-959028691

Fixes the Tree.value attribute for classifiers. Instead of taking the weighted average as we do with regressors we take the weighted class count for each node.

Along with removing the data param, this allows us to create shap explainers. Unfortunately the explainer still segfaults when creating shap_values. Still unsure why.