export declare function std(arr: T[], size: number, rng?: () => number): T[]; export interface TrainTestSplitOptions { /** Fraction in (0, 1) or absolute count; defaults to 0.25 when trainSize is also unset. */ testSize?: number; /** Fraction in (0, 1) or absolute count; defaults to the complement of testSize. */ trainSize?: number; shuffle?: boolean; randomState?: number; /** Class labels; when given, the split preserves per-class proportions (requires shuffle). */ stratify?: any[]; } export interface TrainTestSplitResult { XTrain: X[]; XTest: X[]; yTrain?: Y[]; yTest?: Y[]; } /** * Split `total` across categories proportionally to `counts` (largest-remainder * rounding, deterministic ties by category order); never allocates more than a * category's count. Used by stratified train/test splitting. */ export declare function allocateProportionally(counts: number[], total: number, random?: () => number): number[]; export declare function trainTestSplit(X: X[], y?: Y[], options?: TrainTestSplitOptions): TrainTestSplitResult;