Skip to content
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

Fixed missing feature names for XGBoost #93

Merged
merged 5 commits into from
Jul 30, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed long line
  • Loading branch information
akhvorov committed Jul 17, 2019
commit 74f07d1a3f48766a207f0e6ff7f79fc3eb581e21
4 changes: 2 additions & 2 deletions m2cgen/assemblers/boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def _assemble_tree(self, tree):
return ast.NumVal(tree["leaf"])

threshold = ast.NumVal(tree["split_condition"])
split_feature = tree["split"]
feature_idx = self._feature_name_to_idx.get(split_feature, split_feature)
split = tree["split"]
feature_idx = self._feature_name_to_idx.get(split, split)
feature_ref = ast.FeatureRef(feature_idx)

# Since comparison with NaN (missing) value always returns false we
Expand Down