@@ -179,7 +179,7 @@ class FactorAnalyzer(BaseEstimator, TransformerMixin):
179179 If 'randomized', use faster ``randomized_svd``
180180 function from scikit-learn. The latter should only
181181 be used if the number of columns is greater than or
182- equal to the number of rows in in the dataset.
182+ equal to the number of rows in in the dataset.
183183 Defaults to 'randomized'
184184 rotation_kwargs, optional
185185 Additional key word arguments
@@ -497,7 +497,7 @@ def _fit_principal(self, X):
497497
498498 # perform the randomized singular value decomposition
499499 if self .svd_method == 'randomized' :
500- U , S , V = randomized_svd (X , self .n_factors )
500+ U , S , V = randomized_svd (X , self .n_factors , random_state = 0 )
501501 # otherwise, perform the full SVD
502502 else :
503503 U , S , V = np .linalg .svd (X , full_matrices = False )
@@ -687,11 +687,11 @@ def fit(self, X, y=None):
687687 variance = self ._get_factor_variance (loadings )[0 ]
688688 new_order = list (reversed (np .argsort (variance )))
689689 loadings = loadings [:, new_order ].copy ()
690-
690+
691691 # if the structure matrix exists, reorder
692- if structure is not None :
692+ if structure is not None :
693693 structure = structure [:, new_order ].copy ()
694-
694+
695695 self .phi_ = phi
696696 self .structure_ = structure
697697
0 commit comments