You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import cca_zoo
import numpy as np
rng=np.random.RandomState(0)
X1 = rng.random((10,5))
X2 = rng.random((10,5))
model = CCA()
model.fit((X1,X2)).score((X1,X2))
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[17], line 11
7 X2 = rng.random((10,5))
9 model = CCA()
---> 11 model.fit((X1,X2)).score((X1,X2))
File E:\anaconda3\envs\analysis\Lib\site-packages\cca_zoo\linear\_mcca.py:78, in MCCA.fit(self, views, y, **kwargs)
76 def fit(self, views: Iterable[np.ndarray], y=None, **kwargs):
77 # Validate the input data
---> 78 views = self._validate_data(views)
79 # Check the parameters
80 self._check_params()
File E:\anaconda3\envs\analysis\Lib\site-packages\cca_zoo\_base.py:58, in _BaseModel._validate_data(self, views)
57 def _validate_data(self, views: Iterable[np.ndarray]):
---> 58 if not self._get_tags().get("multiview", False) and len(views) > 2:
59 raise ValueError(
60 f"Model can only be used with two representations, but {len(views)} were given. "
61 "Use MCCA or GCCA instead for CCA or MPLS for PLS."
62 )
63 if self.copy_data:
File E:\anaconda3\envs\analysis\Lib\site-packages\sklearn\base.py:417, in BaseEstimator._get_tags(self)
409 from sklearn.utils._tags import _to_old_tags, get_tags
411 warnings.warn(
412 "The `_get_tags` method is deprecated in 1.6 and will be removed in "
413 "1.7. Please implement the `__sklearn_tags__` method.",
414 category=FutureWarning,
415 )
--> 417 return _to_old_tags(get_tags(self))
File E:\anaconda3\envs\analysis\Lib\site-packages\sklearn\utils\_tags.py:405, in get_tags(estimator)
403 for klass in reversed(type(estimator).mro()):
404 if "__sklearn_tags__" in vars(klass):
--> 405 sklearn_tags_provider[klass] = klass.__sklearn_tags__(estimator) # type: ignore[attr-defined]
406 class_order.append(klass)
407 elif "_more_tags" in vars(klass):
File E:\anaconda3\envs\analysis\Lib\site-packages\sklearn\base.py:859, in TransformerMixin.__sklearn_tags__(self)
858 def __sklearn_tags__(self):
--> 859 tags = super().__sklearn_tags__()
860 tags.transformer_tags = TransformerTags()
861 return tags
AttributeError: 'super' object has no attribute '__sklearn_tags__'
Sklearn version 1.6, run on windows 10 anaconda/jupyter lab.
The text was updated successfully, but these errors were encountered:
Sklearn version 1.6, run on windows 10 anaconda/jupyter lab.
The text was updated successfully, but these errors were encountered: