/** @import {InputType} from "../index.js" */ /** @import {ParametersPCA} from "./index.js" */ /** @import {EigenArgs} from "../linear_algebra/index.js" */ /** * Principal Component Analysis (PCA) * * A linear dimensionality reduction technique that identifies the axes (principal components) * along which the variance of the data is maximized. * * @class * @template {InputType} T * @extends DR * @category Dimensionality Reduction * @see {@link MDS} for another linear alternative * * @example * import * as druid from "@saehrimnir/druidjs"; * * const X = [[1, 2], [3, 4], [5, 6]]; * const pca = new druid.PCA(X, { d: 2 }); * const Y = pca.transform(); * // [[x1, y1], [x2, y2], [x3, y3]] */ export class PCA extends DR { /** * @template {InputType} T * @param {T} X * @param {Partial} parameters * @returns {T} */ static transform(X: T_1, parameters: Partial): T_1; /** * @template {InputType} T * @param {T} X * @param {Partial} parameters * @returns {Matrix} */ static principal_components( X: T_1, parameters: Partial, ): Matrix; /** * @template {InputType} T * @param {T} X * @param {Partial} [parameters] * @returns {Generator} */ static generator( X: T_1, parameters?: Partial, ): Generator; /** * @template {InputType} T * @param {T} X * @param {Partial} [parameters] * @returns {Promise} */ static transform_async( X: T_1, parameters?: Partial, ): Promise; /** * @param {T} X - The high-dimensional data. * @param {Partial} [parameters] - Object containing parameterization of the DR method. */ constructor(X: T, parameters?: Partial); /** * Transforms the inputdata `X` to dimensionality `d`. * * @returns {Generator} A generator yielding the intermediate steps of the projection. */ generator(): Generator; /** * Transforms the inputdata `X` to dimensionality `d`. * * @returns {T} - The projected data. */ transform(): T; /** * Computes the `d` principal components of Matrix `X`. * * @returns {Matrix} */ principal_components(): Matrix; V: Matrix | undefined; } import type { InputType } from "../index.js"; import type { ParametersPCA } from "./index.js"; import { DR } from "./DR.js"; import { Matrix } from "../matrix/index.js"; //# sourceMappingURL=PCA.d.ts.map