-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[WIP] Add SmartSplitter for handling categorical features in decision tree #8030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
if max(categorical_features) >= self.n_features_: | ||
raise ValueError("Categorical feature indices are out of the " | ||
"range; there are only {} features.".format( | ||
self.n_features_)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation error.
uniq_values = set(map(int, X[:, f_idx])) | ||
|
||
if max(uniq_values) + 1 > MAX_CATEGORICAL_LABEL: | ||
raise ValueError("The cardinality ({}) of feature {} is too " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line length limit exceeded. Please run pep8 tests to see more such errors.
For categorical support in trees, I think there remains strong interest in #4899. Please compare notes! |
7571262
to
710b3e1
Compare
cd6c7bd
to
1e8fe03
Compare
…ature split in decision tree. - Use bitmap for tracking categorical split - Update tree.export.export_graphviz()
1e8fe03
to
87182fa
Compare
Add SmartSplitter: use local response proportion for categorical feature during decision tree node split process.
TODO: