Skip to content

Support binary:logistic objective and probability predictions#4

Merged
huangbogeng merged 2 commits into
mainfrom
feature/feat_binary
Apr 20, 2026
Merged

Support binary:logistic objective and probability predictions#4
huangbogeng merged 2 commits into
mainfrom
feature/feat_binary

Conversation

@huangbogeng

Copy link
Copy Markdown
Owner

增加Binary-二分类模型支持

扩展模型加载和预测以支持 binary:logistic 目标函数。
- 在 predict_ensemble 中根据任务类型应用 sigmoid 变换
- 在模型加载时解析 objective 字段并设置 PredictionTask
- 对 binary:logistic 的 base_score 进行 logit 变换以获取 base_margin
- 更新文档和错误信息以反映对回归和分类的支持
- 新增测试以验证从JSON加载的二元分类器能正确预测概率
- 新增测试以验证分类器模型能正确报告基础概率分数
- 移除不再适用的“不支持的目标函数”测试,因为分类器模型现在已被支持
@huangbogeng huangbogeng merged commit e332147 into main Apr 20, 2026
1 check passed
@huangbogeng huangbogeng deleted the feature/feat_binary branch April 20, 2026 03:18
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 this pull request may close these issues.

1 participant