File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed 
sklearn/linear_model/tests Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -452,13 +452,12 @@ def test_get_auto_step_size():
452452                         max_squared_sum_ , alpha , "wrong" , fit_intercept )
453453
454454
455- @pytest .mark .filterwarnings ('ignore:The max_iter was reached' ) 
456455def  test_sag_regressor ():
457456    """tests if the sag regressor performs well""" 
458457    xmin , xmax  =  - 5 , 5 
459458    n_samples  =  20 
460459    tol  =  .001 
461-     max_iter  =  20 
460+     max_iter  =  50 
462461    alpha  =  0.1 
463462    rng  =  np .random .RandomState (0 )
464463    X  =  np .linspace (xmin , xmax , n_samples ).reshape (n_samples , 1 )
@@ -467,7 +466,7 @@ def test_sag_regressor():
467466    y  =  0.5  *  X .ravel ()
468467
469468    clf1  =  Ridge (tol = tol , solver = 'sag' , max_iter = max_iter ,
470-                  alpha = alpha  *  n_samples )
469+                  alpha = alpha  *  n_samples ,  random_state = rng )
471470    clf2  =  clone (clf1 )
472471    clf1 .fit (X , y )
473472    clf2 .fit (sp .csr_matrix (X ), y )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments