forked from microsoft/LightGBM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Python] Refactor scikit-learn API to allow a list of evaluation metr…
…ics (microsoft#3254) * Refactors sklearn API to allow a list of evaluation metrics in the parameter eval_metric of the class (and subclasses of) LGBMModel. Also adds unit tests for this functionality * Simplify expression to check whether the user passed one or multiple metrics to eval_metric parameter * Simplify new tests by using custom metrics already defined in the test file * Update docstring to reflect the fact that the parameter "feval" from the "train" and "cv" functions can also receive a list of callables * Remove oxford comma from docstrings Apply suggestions from code review Co-authored-by: Nikita Titov <[email protected]> * Use named-parameters to make sure code is compatible with future versions of scikit-learn Apply suggestions from code review Co-authored-by: Nikita Titov <[email protected]> * Remove throwaway return value to make code more succinct Co-authored-by: Nikita Titov <[email protected]> * Move statement to group together the code related to feval * Avoid modifying original args as it causes errors in scikit-learn tools For details see: microsoft#2619 * Consolidate multiple eval-metrics unit-tests into one test Co-authored-by: German I Ramirez-Espinoza <gire@home> Co-authored-by: Nikita Titov <[email protected]>
- Loading branch information
1 parent
0faf874
commit afc76d2
Showing
5 changed files
with
132 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters