import { LogCounter } from "./logCounter.js"; import { LogNum } from "./logNum.js"; /** A probability distribution of items. */ export declare class Distribution { private readonly frequencies; constructor(frequencies: ReadonlyMap); static from(data: string): Distribution; static from(data: readonly T[]): Distribution; static from(counter: LogCounter): Distribution; static parse(dumped: Record): Distribution; dump(): Record; /** Get the frequency of the given item. */ get(item: T): LogNum; /** Returns an iterable of [item, log probability] pairs. */ entries(): IterableIterator<[T, LogNum]>; /** k-th moment of the distribution. */ moment(k: number): LogNum; /** Log probability that k items drawn from the distribution are all equal. */ probEqual(k: number): LogNum; /** * Log probability that k items drawn from the distribution have two distinct * values. */ probTwoDistinct(k: number): LogNum; /** * Log probability that k items drawn from the distribution are all equal, * with exactly one exception. */ probAlmostEqual(k: number): LogNum; /** Map the items of the distribution, returning the new distribution. */ map(fn: (item: T) => U): Distribution; /** Chi-squared test statistic against an observed distribution. */ chi2(observed: LogCounter): LogNum; /** Log probability that an unordered distribution is drawn from this. */ probUnordered(observed: LogCounter): LogNum; /** Over- and under-represented items, at the given sigma. */ outliers(observed: LogCounter, sigma?: number): { high: Record; low: Record; }; } //# sourceMappingURL=distribution.d.ts.map