Closed holoubekm closed 1 year ago
I noticed that the function extract_sklearn_tree_from_figs does not support regressor targets - trees with a single class.
extract_sklearn_tree_from_figs
There was a bug / typo in the code. And shape of value_sklearns for classifiers is (N, 2), while for regressors it should be (N, 1).
value_sklearns
These two things prevented ShadowSKDTree from working properly.
ShadowSKDTree
Result: shadow_dtree.is_classifier() now correctly returns False for regressors. And it is possible to plot regressors using ShadowSKDTree.plot()
shadow_dtree.is_classifier()
ShadowSKDTree.plot()
Thanks for the fix! Greatly appreciated :)
I noticed that the function
extract_sklearn_tree_from_figs
does not support regressor targets - trees with a single class.There was a bug / typo in the code. And shape of
value_sklearns
for classifiers is (N, 2), while for regressors it should be (N, 1).These two things prevented
ShadowSKDTree
from working properly.Result:
shadow_dtree.is_classifier()
now correctly returns False for regressors. And it is possible to plot regressors usingShadowSKDTree.plot()