Skip to content

LSP ​

Local Space Preservation (LSP) aims to preserve the local geometry of the data points.

How It Works ​

Local Space Preservation (LSP) focuses on preserving local geometric relationships by treating data points and their neighbors as a local patch, aiming to align these patches in the lower dimension.

Why or When to Use ​

Use LSP when local structure is critical and computing a robust local patch alignment is desired over purely distance-based preserving methods.

Example ​

How-to (Code) ​

javascript
import * as druid from "@saehrimnir/druidjs";

const data = [
  /* ... multi-dimensional data ... */
];

// 1. Initialize the algorithm
const lsp = new druid.LSP(data);

// 2. Compute the projection
const projection = lsp.transform();