import { createRandomGenerator } from '../utils/random'; export { createRandomGenerator }; /** {X, y} pair returned by the dataset generators */ export interface Dataset { /** samples, shape [nSamples][nFeatures] */ X: number[][]; /** labels (or targets), length nSamples */ y: number[]; } /** * Wraps a uniform [0, 1) generator into a standard normal N(0, 1) * generator via the Box-Muller transform. Uniform values are consumed * in pairs and the spare normal deviate is cached between calls, so the * output is deterministic for a seeded `rng`. */ export declare function createGaussianGenerator(rng: () => number): () => number; /** uniform integer in [0, max) */ export declare function randInt(rng: () => number, max: number): number; /** uniform real in [low, high) */ export declare function uniform(rng: () => number, low: number, high: number): number; /** matrix of shape [rows][cols] with i.i.d. uniform [low, high) entries */ export declare function uniformMatrix(rows: number, cols: number, rng: () => number, low: number, high: number): number[][]; /** matrix of shape [rows][cols] with i.i.d. standard normal entries */ export declare function gaussianMatrix(rows: number, cols: number, gaussian: () => number): number[][]; /** Fisher-Yates permutation of [0, size) */ export declare function permutation(size: number, rng: () => number): number[]; /** Shuffles the rows of X and the entries of y with one shared permutation. */ export declare function shuffleInUnison(X: number[][], y: number[], rng: () => number): { X: number[][]; y: number[]; }; /** naive dense matrix product a (n x k) * b (k x m) */ export declare function matMul(a: number[][], b: number[][]): number[][]; /** * Resolves an `nSamples` that is either a total count or an explicit * per-group array into per-group counts. When a total is given, it is * split as evenly as possible over `nGroups`, earlier groups receiving * the remainder (sklearn behaviour). */ export declare function resolveSamplesPerGroup(nSamples: number | number[], nGroups: number): number[];