/** * 1-D Gaussian kernel density estimation (Wave — ML primitives, Phase 3 Task 5). * * The first nonparametric density estimator in the library. Given samples * `s_1..s_n`, estimates the density at query points via a sum of Gaussian * "bumps" centered on each sample: * * density(x) = (1 / (n * h)) * sum_i phi((x - s_i) / h) * * where `phi` is the standard normal pdf and `h` is the bandwidth. Bandwidth * defaults to Silverman's rule of thumb, which balances bias (too smooth) * against variance (too noisy) using the sample spread. */ export interface GaussianKDEOptions { /** Bandwidth (smoothing parameter). Defaults to Silverman's rule of thumb. */ bandwidth?: number; } /** Result of `gaussianKDE`: a density evaluator and the bandwidth it uses. */ export interface GaussianKDEResult { /** Evaluate the estimated density at each of `xs`. */ evaluate: (xs: number[]) => number[]; /** The bandwidth actually used (either supplied or Silverman's rule). */ bandwidth: number; } /** * 1-D Gaussian kernel density estimation. * * @param samples - Observed sample values (n >= 2 for the default bandwidth; * a single sample requires an explicit `opts.bandwidth`) * @param opts - `bandwidth` (default: Silverman's rule of thumb) * @returns `evaluate(xs)` — density at each query point — and the chosen `bandwidth` * * @example * const kde = gaussianKDE([-1, 0, 0, 1]); * kde.evaluate([0]); // => density near the sample center (a single peak) */ export declare function gaussianKDE(samples: number[], opts?: GaussianKDEOptions): GaussianKDEResult; //# sourceMappingURL=kde.d.ts.map