cerlymarco / linear-tree

A python library to build Model Trees with Linear Models at the leaves.
MIT License
338 stars 54 forks source link

Use of categorical text attributes #8

Closed melovv closed 2 years ago

melovv commented 2 years ago

Hello there!

This is a great package that I just found out. I’m still experimenting on it but it’s working nice.

I was trying to use categorical text features but it seems the package can only get numerical attributes and bin them internally to get the categories. I am doing something wrong? I’d love to give this project 5 stars.

Thanks!

cerlymarco commented 2 years ago

Hi, thanks for your feedback

Yes, you are doing it correctly... categorical features must be integer encoded before fitting. This is a normal behavior in common with all the sklearn estimators which accepts data only in numerical format.

Thanks!