LocallyLinearEmbedding<T>
Models & Types · AiDotNet.Preprocessing.DimensionalityReduction
Locally Linear Embedding for nonlinear dimensionality reduction.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → LocallyLinearEmbedding<T>
For Beginners
LLE preserves local relationships:
- Each point is described by its neighbors
- The weights describe “how much” each neighbor contributes
- The embedding keeps these relationships intact
- Good for unfolding curved manifolds (like the Swiss roll)
How It Works
LLE preserves local neighborhood structure by representing each point as a weighted linear combination of its neighbors. The embedding is found by preserving these reconstruction weights in lower dimensions.
The algorithm:
- Find k nearest neighbors for each point
- Compute reconstruction weights that best reconstruct each point from neighbors
- Find low-dimensional embedding that preserves these weights
Constructors
| Constructor | Summary |
|---|---|
LocallyLinearEmbedding(int nComponents, int nNeighbors, double reg, LLEMethod method, int[] columnIndices) |
Creates a new instance of LocallyLinearEmbedding. |
Properties
| Property | Summary |
|---|---|
LLEMethod Method { get; } |
Gets the LLE method. |
Matrix<T> Embedding { get; } |
Gets the embedding result. |
bool SupportsInverseTransform { get; } |
Gets whether this transformer supports inverse transformation. |
double Regularization { get; } |
Gets the regularization parameter. |
int NComponents { get; } |
Gets the number of components. |
int NNeighbors { get; } |
Gets the number of neighbors. |
Methods
| Method | Summary |
|---|---|
string[] GetFeatureNamesOut(string[] inputFeatureNames) |
Gets the output feature names after transformation. |