Fix skl nan tag. (#5538)

This commit is contained in:
Jiaming Yuan
2020-04-18 06:52:17 +08:00
committed by GitHub
parent cfee9fae91
commit c69a19e2b1
3 changed files with 25 additions and 3 deletions

View File

@@ -244,6 +244,10 @@ class XGBModel(XGBModelBase):
self.gpu_id = gpu_id
self.validate_parameters = validate_parameters
def _more_tags(self):
'''Tags used for scikit-learn data validation.'''
return {'allow_nan': True}
def get_booster(self):
"""Get the underlying xgboost Booster of this model.