@@ -522,24 +522,24 @@ def _check_params(self):
522
522
523
523
if isinstance (self .max_features , str ):
524
524
if self .max_features == "auto" :
525
- max_features = self .n_features
525
+ max_features = self .n_features_
526
526
elif self .max_features == "sqrt" :
527
- max_features = max (1 , int (numpy .sqrt (self .n_features )))
527
+ max_features = max (1 , int (numpy .sqrt (self .n_features_ )))
528
528
elif self .max_features == "log2" :
529
- max_features = max (1 , int (numpy .log2 (self .n_features )))
529
+ max_features = max (1 , int (numpy .log2 (self .n_features_ )))
530
530
else :
531
531
raise ValueError ("Invalid value for max_features: %r. "
532
532
"Allowed string values are 'auto', 'sqrt' "
533
533
BFEB
"or 'log2'." % self .max_features )
534
534
elif self .max_features is None :
535
- max_features = self .n_features
535
+ max_features = self .n_features_
536
536
elif isinstance (self .max_features , (numbers .Integral , numpy .integer )):
537
537
if self .max_features < 1 :
538
538
raise ValueError ("max_features must be in (0, n_features]" )
539
539
max_features = self .max_features
540
540
else : # float
541
541
if 0. < self .max_features <= 1. :
542
- max_features = max (int (self .max_features * self .n_features ), 1 )
542
+ max_features = max (int (self .max_features * self .n_features_ ), 1 )
543
543
else :
544
544
raise ValueError ("max_features must be in (0, 1.0]" )
545
545
@@ -727,7 +727,7 @@ def fit(self, X, y, sample_weight=None, monitor=None):
727
727
random_state = check_random_state (self .random_state )
728
728
729
729
X , event , time = check_arrays_survival (X , y , accept_sparse = ['csr' , 'csc' , 'coo' ], dtype = DTYPE )
730
- n_samples , self .n_features = X .shape
730
+ n_samples , self .n_features_ = X .shape
731
731
732
732
X = X .astype (DTYPE )
733
733
if sample_weight is None :
0 commit comments