8000 n_features_in_ consistency for FactorAnalysis · scikit-learn/scikit-learn@108c7a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 108c7a4

Browse files
committed
n_features_in_ consistency for FactorAnalysis
1 parent c05e267 commit 108c7a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn/decomposition/_factor_analysis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
from ..base import BaseEstimator, TransformerMixin
29-
from ..utils import check_array, check_random_state
29+
from ..utils import check_random_state
3030
from ..utils.extmath import fast_logdet, randomized_svd, squared_norm
3131
from ..utils.validation import check_is_fitted, _deprecate_positional_args
3232
from ..exceptions import ConvergenceWarning
@@ -279,7 +279,7 @@ def transform(self, X):
279279
"""
280280
check_is_fitted(self)
281281

282-
X = check_array(X)
282+
X = self._validate_data(X, reset=False)
283283
Ih = np.eye(len(self.components_))
284284

285285
X_transformed = X - self.mean_
@@ -350,7 +350,7 @@ def score_samples(self, X):
350350
Log-likelihood of each sample under the current model
351351
"""
352352
check_is_fitted(self)
353-
353+
X = self._validate_data(X, copy=self.copy, dtype=np.float64)
354354
Xr = X - self.mean_
355355
precision = self.get_precision()
356356
n_features = X.shape[1]

0 commit comments

Comments
 (0)
0