Skip to content

lle_manifold_compression

Bases: manifold_compression

A manifold-based dimensionality reduction class using Locally Linear Embedding (LLE).

This class applies the LLE algorithm to reduce the dimensionality of input data, preserving local neighborhood relationships.

Methods:

Name Description
__init__

Initializes the LLE-based dimensionality reduction instance.

Parameters:

Name Type Description Default
D int

Number of dimensions to retain after compression.

required
n_neighbors int

Number of neighbors to use in the LLE algorithm. Defaults to 1.

1
name str

Name of the transformation. Defaults to 'lle_manifold_compression'.

'lle_manifold_compression'
*args tuple

Additional positional arguments for the parent manifold_compression class.

()
**kwargs dict

Additional keyword arguments for the parent manifold_compression class.

{}
Source code in tinybig/compression/manifold_compression.py
class lle_manifold_compression(manifold_compression):
    """
        A manifold-based dimensionality reduction class using Locally Linear Embedding (LLE).

        This class applies the LLE algorithm to reduce the dimensionality of input data,
        preserving local neighborhood relationships.

        Methods
        -------
        __init__(D, n_neighbors=1, name='lle_manifold_compression', *args, **kwargs)
            Initializes the LLE-based dimensionality reduction instance.

        Parameters
        ----------
        D : int
            Number of dimensions to retain after compression.
        n_neighbors : int, optional
            Number of neighbors to use in the LLE algorithm. Defaults to 1.
        name : str, optional
            Name of the transformation. Defaults to 'lle_manifold_compression'.
        *args : tuple
            Additional positional arguments for the parent `manifold_compression` class.
        **kwargs : dict
            Additional keyword arguments for the parent `manifold_compression` class.
    """
    def __init__(self, D: int, n_neighbors: int = 1, name='lle_manifold_compression', *args, **kwargs):
        """
            Initializes the LLE-based dimensionality reduction instance.

            Parameters
            ----------
            D : int
                Number of dimensions to retain after compression.
            n_neighbors : int, optional
                Number of neighbors to use in the LLE algorithm. Defaults to 1.
            name : str, optional
                Name of the transformation. Defaults to 'lle_manifold_compression'.
            *args : tuple
                Additional positional arguments for the parent `manifold_compression` class.
            **kwargs : dict
                Additional keyword arguments for the parent `manifold_compression` class.
        """
        manifold_function = lle_manifold(n_components=D, n_neighbors=n_neighbors)
        super().__init__(D=D, n_neighbors=n_neighbors, name=name, manifold_function=manifold_function, *args, **kwargs)

__init__(D, n_neighbors=1, name='lle_manifold_compression', *args, **kwargs)

Initializes the LLE-based dimensionality reduction instance.

Parameters:

Name Type Description Default
D int

Number of dimensions to retain after compression.

required
n_neighbors int

Number of neighbors to use in the LLE algorithm. Defaults to 1.

1
name str

Name of the transformation. Defaults to 'lle_manifold_compression'.

'lle_manifold_compression'
*args tuple

Additional positional arguments for the parent manifold_compression class.

()
**kwargs dict

Additional keyword arguments for the parent manifold_compression class.

{}
Source code in tinybig/compression/manifold_compression.py
def __init__(self, D: int, n_neighbors: int = 1, name='lle_manifold_compression', *args, **kwargs):
    """
        Initializes the LLE-based dimensionality reduction instance.

        Parameters
        ----------
        D : int
            Number of dimensions to retain after compression.
        n_neighbors : int, optional
            Number of neighbors to use in the LLE algorithm. Defaults to 1.
        name : str, optional
            Name of the transformation. Defaults to 'lle_manifold_compression'.
        *args : tuple
            Additional positional arguments for the parent `manifold_compression` class.
        **kwargs : dict
            Additional keyword arguments for the parent `manifold_compression` class.
    """
    manifold_function = lle_manifold(n_components=D, n_neighbors=n_neighbors)
    super().__init__(D=D, n_neighbors=n_neighbors, name=name, manifold_function=manifold_function, *args, **kwargs)