Skip to content

mds_manifold

Bases: manifold

Manifold learning using the Multidimensional Scaling (MDS) algorithm.

This class implements dimensionality reduction using the MDS algorithm, which minimizes the stress of the low-dimensional representation of the data.

Source code in tinybig/koala/manifold/manifold.py
class mds_manifold(manifold):
    """
    Manifold learning using the Multidimensional Scaling (MDS) algorithm.

    This class implements dimensionality reduction using the MDS algorithm, which minimizes the stress of the
    low-dimensional representation of the data.
    """
    def __init__(self, name: str = 'mds_manifold', *args, **kwargs):
        """
        Initialize the MDS manifold learning class.

        Parameters
        ----------
        name : str, optional
            The name of the manifold learning method. Default is 'mds_manifold'.
        *args, **kwargs
            Additional arguments for the base class.
        """
        super().__init__(name=name, *args, **kwargs)

    def init_model(self):
        """
        Initialize the MDS model.
        """
        self.model = MDS(n_components=self.n_components)

__init__(name='mds_manifold', *args, **kwargs)

Initialize the MDS manifold learning class.

Parameters:

Name Type Description Default
name str

The name of the manifold learning method. Default is 'mds_manifold'.

'mds_manifold'
*args

Additional arguments for the base class.

()
**kwargs

Additional arguments for the base class.

()
Source code in tinybig/koala/manifold/manifold.py
def __init__(self, name: str = 'mds_manifold', *args, **kwargs):
    """
    Initialize the MDS manifold learning class.

    Parameters
    ----------
    name : str, optional
        The name of the manifold learning method. Default is 'mds_manifold'.
    *args, **kwargs
        Additional arguments for the base class.
    """
    super().__init__(name=name, *args, **kwargs)

init_model()

Initialize the MDS model.

Source code in tinybig/koala/manifold/manifold.py
def init_model(self):
    """
    Initialize the MDS model.
    """
    self.model = MDS(n_components=self.n_components)