-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
TruncatedSVD.transform does not check if fitted #16806
Copy link
Copy link
Closed
Labels
Description
Describe the bug
TruncatedSVD.transform does not call check_is_fitted(self).
Steps/Code to Reproduce
numpy as np
from sklearn.decomposition import TruncatedSVD
tsvd = TruncatedSVD()
X = np.arange(6).reshape((3,2))
tsvd.transform(X)Expected Results
NotFittedError
Actual Results
AttributeError: 'TruncatedSVD' object has no attribute 'components_'
Further Notes
Is there a reason, why TruncatedSVD.transform calls X = check_array(X, accept_sparse='csr'), i.e. converts to CSR-format?
Versions
sklearn: 0.23.dev0
Reactions are currently unavailable