Pipeline Components
Random Projection Embedding

RandomProjectionEmbedding

This model supports two methods of generating embeddings.

Sparse Random Projection

Reduces the dimensionality of inputs by projecting them onto a sparse random projection matrix using a density (ratio of non-zero components in the matrix) of 0.1.

Gaussian Random Projection

Reduces the dimensionality of inputs through Gaussian random projection where the components of the random projections matrix are drawn from N(0, 1/n_embeddings).

Parameters

  • n_embeddings(Default:2) → Number of components to project the data onto.

  • type_embedding(Default:Gaussian) → Method to use for random projection. Options are "Gaussian" and "Sparse".

Example Usage

We can create an instance of the RandomProjectionEmbedding model like this.

import turboml as tb
embedding = tb.RandomProjectionEmbedding(n_embeddings = 4)