Revision 85fbc1e20d309b4d1d31353bc8ed0f74bfd37050 authored by Meraj Hashemizadeh on 30 August 2021, 20:41:50 UTC, committed by Meraj Hashemizadeh on 30 August 2021, 20:41:50 UTC
1 parent 5a6992a
Raw File
_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