-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[python-package] check feature names in predict with dataframe (fixes #…
…812) (#4909) * check feature names and order in predict with dataframe * slice df in predict to remove the target * scramble features * handle int column names * only change column order when needed * include validate_features param in booster and sklearn estimators * document validate_features argument * use all_close in preds checks and check for assertion error to compare different arrays * perform remapping and checks in cpp * remove extra logs * fixes * revert cpp * proposal * remove extra arg * lint * restore _data_from_pandas arguments * Apply suggestions from code review Co-authored-by: Nikita Titov <[email protected]> * move data conversion to Predictor.predict * use Vector2Ptr Co-authored-by: Nikita Titov <[email protected]>
- Loading branch information
1 parent
521fe8d
commit bdb02e0
Showing
6 changed files
with
127 additions
and
19 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
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