File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,10 @@ def predict(self, feature_matrix: np.ndarray) -> np.ndarray:
7373 return  np .where (clf_preds  >=  0 , 1 , 0 )
7474
7575 def  _build_stump (
76-  self , feature_matrix : np .ndarray , target_signed : np .ndarray , sample_weights : np .ndarray 
76+  self ,
77+  feature_matrix : np .ndarray ,
78+  target_signed : np .ndarray ,
79+  sample_weights : np .ndarray ,
7780 ) ->  Dict [str , Any ]:
7881 """Find the best decision stump for current weights.""" 
7982 n_samples , n_features  =  feature_matrix .shape 
@@ -83,7 +86,9 @@ def _build_stump(
8386 thresholds  =  np .unique (feature_matrix [:, feature ])
8487 for  threshold  in  thresholds :
8588 for  polarity  in  [1 , - 1 ]:
86-  pred  =  self ._stump_predict (feature_matrix , feature , threshold , polarity )
89+  pred  =  self ._stump_predict (
90+  feature_matrix , feature , threshold , polarity 
91+  )
8792 error  =  np .sum (sample_weights  *  (pred  !=  target_signed ))
8893 if  error  <  min_error :
8994 min_error  =  error 
                         You can’t perform that action at this time. 
           
                  
0 commit comments