Class DimRed<P>Abstract

A class for performing dimensionality reduction on a matrix of data.

Type Parameters

  • P extends DimRedParams

    The type of the parameters for the class.

Hierarchy

Constructors

  • Constructs a new instance of the DimRed class.

    Type Parameters

    Parameters

    • data: Matrix | number[][]

      The matrix of data to perform dimensionality reduction on.

    • Optional params: Partial<P>

      Optional parameters for the algorithm.

    Returns DimRed<P>

Properties

_data: Matrix
_initialized: boolean = false
_iter: number = 0
_params: P & DimRedParams
_projection: Matrix
_randomizer: Randomizer
_result: Matrix

Accessors

  • get dimensionality(): number
  • Gets the dimensionality of the data after dimensionality reduction.

    Returns number

  • get metric(): string
  • Gets the metric used for calculating distances between data points.

    Returns string

Methods

  • Checks if the class has been initialized and initializes it if it hasn't.

    Returns void

  • A generator function that yields the projection of the data after each iteration.

    Parameters

    • iterations: number = 500

      The number of iterations to perform. Default to 500.

    Returns Generator<Matrix, Matrix, unknown>

    The projection of the data after dimensionality reduction.

    Yields

    The projection of the data after each iteration.

  • Transforms the data by performing dimensionality reduction on it.

    Parameters

    • iterations: number = 500

      The number of iterations to perform. Default to 500.

    Returns Matrix

    The projection of the data after dimensionality reduction.