• José Morales's avatar
    [python-package] check feature names in predict with dataframe (fixes #812) (#4909) · bdb02e05
    José Morales authored
    
    
    * 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: default avatarNikita Titov <nekit94-08@mail.ru>
    
    * move data conversion to Predictor.predict
    
    * use Vector2Ptr
    Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
    bdb02e05
sklearn.py 54.6 KB