UNPKG

@formant/ava

Version:

A framework for automated visual analytics.

107 lines (105 loc) 3.28 kB
/** * Get the minimum of the array. * @param value - The array to process */ export declare function min(value: number[]): number; /** * Get the minimum index of the array. * @param value - The array to process */ export declare function minIndex(value: number[]): number; /** * Get the maximum of the array. * @param value - The array to process */ export declare function max(value: number[]): number; /** * Get the maximum index of the array. * @param value - The array to process */ export declare function maxIndex(value: number[]): number; /** * Calculate the sum of the array. * @param value - The array to process */ export declare function sum(value: number[]): number; /** * Calculate the mean of the array. * @param value - The array to process */ export declare function mean(value: number[]): number; /** * Calculate the geometricMean of the array. * @param value - The array to process */ export declare function geometricMean(value: number[]): number; /** * Calculate the harmonic mean of the array. * @param value - The array to process */ export declare function harmonicMean(value: number[]): number; /** * Calculate the median of the array. * @param value - The array to process */ export declare function median(value: number[], sorted?: boolean): number; /** * Calculate the quartile of the array. * @param value - The array to process * @param sorted - Whether it is sorted */ export declare function quartile(value: number[], sorted?: boolean): [number, number, number]; /** * Calculate the quantile of the array. * @param value - The array to process * @param percent - percent * @param sorted - Whether it is sorted */ export declare function quantile(value: number[], percent: number, sorted?: boolean): number; /** * Calculate the variance of the array. * @param value - The array to process */ export declare function variance(value: number[]): number; /** * Calculate the standard deviation of the array. * @param value - The array to process */ export declare function standardDeviation(value: number[]): number; /** * Calculate the coefficient of variance of the array. * @param value - The array to process */ export declare function coefficientOfVariance(value: number[]): number; /** * Calculate the covariance of the array. * @param x - variable x * @param y - variable y */ export declare function covariance(x: number[], y: number[]): number; /** * Calculate the pearson correlation coefficient of two value. * @param x - variable x * @param y - variable y */ export declare function pearson(x: number[], y: number[]): number; /** * Calculate the counts of valid value in the array. * @param value - The array to process */ export declare function valid(value: unknown[]): number; /** * Calculate the counts of missing value in the array. * @param value - The array to process */ export declare function missing(value: unknown[]): number; /** * Calculate the counts of each distinct value in the array. * @param value - The array to process */ export declare function valueMap(value: unknown[]): Record<string, number>; /** * Calculate the counts of distinct value in the array. * @param value - The array to process */ export declare function distinct(value: unknown[]): number;