export type FitType = 'linear' | 'polynomial' | 'exponential' | 'logarithmic' | 'power'; export interface FitOptions { /** Degree for polynomial fit (default: 2) */ degree?: number; /** Custom label for the equation */ label?: string; /** Number of decimals in equation string */ precision?: number; } export interface FitResult { type: FitType; /** Coefficients (a, b, c...) */ coefficients: number[]; /** Formatted equation string */ equation: string; /** Coefficient of determination */ rSquared: number; /** Function to calculate value at X */ predict: (x: number) => number; } /** * Perform regression on a dataset */ export declare function fitData(x: number[] | Float32Array, y: number[] | Float32Array, type: FitType, options?: FitOptions): FitResult;