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

Throw error when using unsupported objective with predict_proba. #6835

Closed
wants to merge 2 commits into from

Conversation

trivialfis
Copy link
Member

@trivialfis trivialfis commented Apr 7, 2021

This partially reverts #6817 on the use of softmax. Looking into it more thoroughly, the softmax function can never appear in training due to automatic configuration in fit. But the objective can still be invalid for predict_proba (like softmax) as illustrated in the test as an edge case. Previously I let those functions pass and may return an incorrect result. This PR reverts that part and throws a ValueError. Other than that fixes in linked PR are still useful and kept.

@trivialfis trivialfis requested a review from hcho3 April 7, 2021 08:49
@trivialfis trivialfis closed this Apr 7, 2021
@trivialfis
Copy link
Member Author

Closing for now. Handling this edge case might require more efforts.

@trivialfis trivialfis deleted the predict_proba branch April 7, 2021 08:55
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.

None yet

1 participant