Skip to content

lle_manifold

Bases: manifold

Manifold learning using the Locally Linear Embedding (LLE) algorithm.

This class implements dimensionality reduction using the LLE algorithm, which preserves local geometric structure in the data.

Source code in tinybig/koala/manifold/manifold.py
class lle_manifold(manifold):
    """
    Manifold learning using the Locally Linear Embedding (LLE) algorithm.

    This class implements dimensionality reduction using the LLE algorithm, which preserves local geometric
    structure in the data.
    """
    def __init__(self, name: str = 'lle_manifold', *args, **kwargs):
        """
        Initialize the LLE manifold learning class.

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

    def init_model(self):
        """
        Initialize the LLE model.
        """
        self.model = LocallyLinearEmbedding(n_neighbors=self.n_neighbors, n_components=self.n_components)

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

Initialize the LLE manifold learning class.

Parameters:

Name Type Description Default
name str

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

'lle_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 = 'lle_manifold', *args, **kwargs):
    """
    Initialize the LLE manifold learning class.

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

init_model()

Initialize the LLE model.

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