/** @import {InputType} from "../index.js" */ /** @import {Metric} from "../metrics/index.js" */ /** @import {ParametersTSNE} from "./index.js" */ /** * t-SNE (t-Distributed Stochastic Neighbor Embedding) * * A nonlinear dimensionality reduction technique particularly well-suited * for visualizing high-dimensional data in 2D or 3D. Preserves local * structure while revealing global patterns. * * @class * @template {InputType} T * @extends DR * @category Dimensionality Reduction * @see {@link https://lvdmaaten.github.io/tsne/|t-SNE Paper} * @see {@link UMAP} for faster alternative with similar results * * @example * import * as druid from "@saehrimnir/druidjs"; * * const X = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]; * const tsne = new druid.TSNE(X, { * perplexity: 30, * epsilon: 10, * d: 2, * seed: 42 * }); * * const Y = tsne.transform(500); // 500 iterations * // [[x1, y1], [x2, y2], [x3, y3]] */ export class TSNE 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 {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); _iter: number; init(): this; _ystep: Matrix | undefined; _gains: Matrix | undefined; _P: Matrix | undefined; /** * @param {number} [iterations=500] - Number of iterations. Default is `500` * @returns {T} The projection. */ transform(iterations?: number): T; /** * @param {number} [iterations=500] - Number of iterations. Default is `500` * @returns {Generator} - The projection. */ generator(iterations?: number): Generator; /** * Performs a optimization step * * @private * @returns {Matrix} */ private next; } import type { InputType } from "../index.js"; import type { ParametersTSNE } from "./index.js"; import { DR } from "./DR.js"; import { Matrix } from "../matrix/index.js"; //# sourceMappingURL=TSNE.d.ts.map