/** * Computes the coefficients of a polynomial regression for the given `samples` * (each a [x,y] tuple). The `degree` param defines the degree of the polynomial * and the number of returned coefficients (+1). * * @remarks * The resulting coeffs can be then used with {@link polynomial} to evaluate the * curve (i.e. used to make predictions). * * @param samples * @param degree */ export declare const polynomialRegression: (samples: number[][], degree: number) => number[]; /** * Computes polynomial for `x` and given `coeffs` (in order of increasing * exponents). * * @remarks * See {@link polynomialRegression} for computing coefficients. * * The number of given coefficients defines the degree (+1) of the polynomial, * i.e. a cubic function will require 4 coeffs, with the y-intercept being the * first coeff. * * @param x * @param coeffs */ export declare const polynomial: (x: number, coeffs: number[]) => number; /** * Takes an augmented matrix (in column-major order) and uses Gaussian * elimination to compute solution coefficients for its system of linear * equations `Ax = b`. * * @remarks * References: * - https://en.wikipedia.org/wiki/Gaussian_elimination * - https://www.geeksforgeeks.org/dsa/gaussian-elimination/ * * @param mat * @param degree */ export declare const gaussianElimination: (mat: number[][], degree: number) => number[]; //# sourceMappingURL=regression.d.ts.map