[MRG+1] Export ClassificationCriterion and RegressionCriterion#10325
[MRG+1] Export ClassificationCriterion and RegressionCriterion#10325glemaitre merged 1 commit intoscikit-learn:masterfrom camilstaps:10251-extend-criterion
Conversation
|
I'm fine with this as an intermediate step. LGTM. |
|
LGTM. Merging ... thanks @camilstaps |
|
@camilstaps I need to create a custom criterion function for the RandomForestRegressor. Can you provide an example of how to pass a custom function using the new patch? Much appreciated. |
|
@glemaitre
I went through sklearn setup files and MANIFEST and looks like the .pxd should have got into the whl and be deployed Can you please direct me on the proper way to inherit the exported ClassificationCriterion? Thank you |
Reference Issues/PRs
Resolves #10251.
What does this implement/fix? Explain your changes.
This allows extending of
ClassificationCriterionandRegressionCriterion. For an example use case, see https://stats.stackexchange.com/q/316954/98500.Any other comments?
I wasn't sure what to do with the documentation. The documentation on
Criterionis different in the pyx and the pxd, and the latter is not a docstring. I copied the very succinct docstring forClassificationCriterionand wrote a similar one forRegressionCriterion. But asCriteriondoes something weird, which I cannot find in the coding guidelines, I don't know what I should do there. Advise appreciated.Because this is not a public API, I did not provide usage examples. (A usage example would by any of the subclasses defined in the pyx.) Please let me know if they should be added.
Thanks for reviewing!