@@ -316,12 +316,12 @@ def _fit(self, X, y):
316
316
# 0 - default state = tentative in original code
317
317
# 1 - accepted in original code
318
318
# -1 - rejected in original code
319
- dec_reg = np .zeros (n_feat , dtype = np . int )
319
+ dec_reg = np .zeros (n_feat , dtype = int )
320
320
# counts how many times a given feature was more important than
321
321
# the best of the shadow features
322
- hit_reg = np .zeros (n_feat , dtype = np . int )
322
+ hit_reg = np .zeros (n_feat , dtype = int )
323
323
# these record the history of the iterations
324
- imp_history = np .zeros (n_feat , dtype = np . float )
324
+ imp_history = np .zeros (n_feat , dtype = float )
325
325
sha_max_history = []
326
326
327
327
# set n_estimators
@@ -393,13 +393,13 @@ def _fit(self, X, y):
393
393
394
394
# basic result variables
395
395
self .n_features_ = confirmed .shape [0 ]
396
- self .support_ = np .zeros (n_feat , dtype = np . bool )
396
+ self .support_ = np .zeros (n_feat , dtype = bool )
397
397
self .support_ [confirmed ] = 1
398
- self .support_weak_ = np .zeros (n_feat , dtype = np . bool )
398
+ self .support_weak_ = np .zeros (n_feat , dtype = bool )
399
399
self .support_weak_ [tentative ] = 1
400
400
401
401
# ranking, confirmed variables are rank 1
402
- self .ranking_ = np .ones (n_feat , dtype = np . int )
402
+ self .ranking_ = np .ones (n_feat , dtype = int )
403
403
# tentative variables are rank 2
404
404
self .ranking_ [tentative ] = 2
405
405
# selected = confirmed and tentative
@@ -425,7 +425,7 @@ def _fit(self, X, y):
425
425
self .ranking_ [not_selected ] = ranks
426
426
else :
427
427
# all are selected, thus we set feature supports to True
428
- self .support_ = np .ones (n_feat , dtype = np . bool )
428
+ self .support_ = np .ones (n_feat , dtype = bool )
429
429
430
430
self .importance_history_ = imp_history
431
431
0 commit comments