swh:1:snp:4e3e7077647a709f15b8c1b32ce7100175d0580b
Raw File
Tip revision: fa272515cfb398d4b1ca644ba50f4f82dff63d20 authored by Jean Kossaifi on 03 September 2021, 17:55:21 UTC
Merge pull request #293 from IsabellLehmann/cmtf_als
Tip revision: fa27251
_base_decomposition.py
"""Base classes for all estimators, ensure compatibility with Scikit-Learn
"""

class DecompositionMixin:
    def fit(self, tensor, **kwargs):
        _ = self.fit_transform(tensor, **kwargs)
        return self
    
    def __repr__(self):
        return f'{self.__class__.__name__} decomposition of rank {self.rank}.'
back to top