parent
ea44417754
commit
c2a3902ba3
@ -536,7 +536,7 @@ class XGBModel(XGBModelBase):
|
||||
feature_importances_ : array of shape ``[n_features]``
|
||||
|
||||
"""
|
||||
if getattr(self, 'booster', None) is not None and self.booster != 'gbtree':
|
||||
if getattr(self, 'booster', None) is not None and self.booster not in {'gbtree', 'dart'}:
|
||||
raise AttributeError('Feature importance is not defined for Booster type {}'
|
||||
.format(self.booster))
|
||||
b = self.get_booster()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user