SpectralEmbedding<T>

Models & Types · AiDotNet.Preprocessing.DimensionalityReduction

Spectral Embedding for nonlinear dimensionality reduction.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → SpectralEmbedding<T>

For Beginners

Spectral Embedding uses graph theory:

  • Build a graph where similar points are connected
  • Use the graph’s structure to find good coordinates
  • Similar to what’s used in spectral clustering
  • Good for data with cluster structure

How It Works

Spectral Embedding forms an affinity matrix from the data and computes the eigenvectors of the graph Laplacian. This provides a low-dimensional representation that preserves local connectivity.

The algorithm constructs a similarity graph and uses spectral decomposition of the Laplacian matrix to find coordinates that respect graph structure.

Constructors

Constructor Summary
SpectralEmbedding(int nComponents, SpectralAffinity affinity, double? gamma, int nNeighbors, int? randomState, int[] columnIndices) Creates a new instance of SpectralEmbedding.

Properties

Property Summary
Matrix<T> AffinityMatrix { get; } Gets the affinity matrix.
Matrix<T> Embedding { get; } Gets the embedding result.
SpectralAffinity Affinity { get; } Gets the affinity type.
bool SupportsInverseTransform { get; } Gets whether this transformer supports inverse transformation.
double Gamma { get; } Gets the gamma parameter for RBF kernel.
int NComponents { get; } Gets the number of components.
int NNeighbors { get; } Gets the number of neighbors for nearest neighbors affinity.

Methods

Method Summary
string[] GetFeatureNamesOut(string[] inputFeatureNames) Gets the output feature names after transformation.