parrt / dtreeviz

A python library for decision tree visualization and model interpretation.
MIT License
2.89k stars 333 forks source link

Tf catvars from tlapusan #265

Closed parrt closed 1 year ago

parrt commented 1 year ago

Starting from @tlapusan, raising exceptions when categorical variable's are used in feature space. I just don't know how to display that at the moment. Popping the version to 2.2.0 to incorporate categorical vars.

Derived from https://github.com/parrt/dtreeviz/pull/263

We still need to test the decision notes more, such as when there are lots of levels in the catvars.

parrt commented 1 year ago

The code looks good to me, besides one print statement. I don't see text axis tick labels in either of the demo notebooks though? sex_label is still 0 or 1.

We have an updated the notebooks yet but I do have tutorial I'm working on that uses categoricals. Take a look at testing/tf-catvars.py for some playing around.

I need to fix testing/tf-catvars2.py... Working on that now hi cardinality categorical fails.