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

Missing binary:hinge #579

Closed
realjanpaulus opened this issue Aug 24, 2022 · 0 comments · Fixed by #602
Closed

Missing binary:hinge #579

realjanpaulus opened this issue Aug 24, 2022 · 0 comments · Fixed by #602

Comments

@realjanpaulus
Copy link

Is there a reason why binary:hinge isn't supported as objective for XGBoost?

if objective == "binary:logistic":
ncl = 2
container.add_node('TreeEnsembleClassifier', operator.input_full_names,
operator.output_full_names,
op_domain='ai.onnx.ml',
name=scope.get_unique_operator_name('TreeEnsembleClassifier'),
**attr_pairs)
elif objective in ("multi:softprob", "multi:softmax"):
ncl = len(js_trees) // params['n_estimators']
if objective == 'multi:softmax':
attr_pairs['post_transform'] = 'NONE'
container.add_node('TreeEnsembleClassifier', operator.input_full_names,
operator.output_full_names,
op_domain='ai.onnx.ml',
name=scope.get_unique_operator_name('TreeEnsembleClassifier'),
**attr_pairs)
elif objective == "reg:logistic":
ncl = len(js_trees) // params['n_estimators']
if ncl == 1:
ncl = 2
container.add_node('TreeEnsembleClassifier', operator.input_full_names,
operator.output_full_names,
op_domain='ai.onnx.ml',
name=scope.get_unique_operator_name('TreeEnsembleClassifier'),
**attr_pairs)
else:
raise RuntimeError("Unexpected objective: {0}".format(objective))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant