DiffusionMaps<T>

Models & Types · AiDotNet.Preprocessing.DimensionalityReduction

Diffusion Maps for nonlinear dimensionality reduction.

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

For Beginners

Diffusion Maps captures the underlying geometry by:

  • Simulating how information “diffuses” through the data
  • Points connected by many short paths are close in diffusion distance
  • Robust to noise compared to geodesic distances

Use cases:

  • Discovering underlying manifold structure
  • Robust to noise in the data
  • When you want distances to reflect connectivity, not just proximity

How It Works

Diffusion Maps embeds data into a low-dimensional space where Euclidean distances approximate diffusion distances on the data manifold. It simulates a random walk on the data graph and uses the eigenvectors of the diffusion operator.

The algorithm:

  1. Constructs a kernel matrix (typically Gaussian)
  2. Normalizes to create a Markov transition matrix
  3. Computes eigenvectors of the diffusion operator
  4. Scales eigenvectors by eigenvalue powers for embedding

Constructors

Constructor Summary
DiffusionMaps(int nComponents, double alpha, int diffusionTime, double epsilon, int? randomState, int[] columnIndices) Creates a new instance of DiffusionMaps.

Properties

Property Summary
Matrix<T> Embedding { get; } Gets the embedding result.
Vector<T> Eigenvalues { get; } Gets the eigenvalues.
bool SupportsInverseTransform { get; } Gets whether this transformer supports inverse transformation.
int DiffusionTime { get; } Gets the diffusion time parameter.
int NComponents { get; } Gets the number of components (dimensions).

Methods

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