/** * Determinant by Gaussian elimination with partial pivoting. * @param {number[][]} a * @returns {number} */ export function determinant(a: number[][]): number; /** * Inverse of a symmetric positive definite matrix through its Cholesky factor. * @param {number[][]} a * @returns {number[][]} */ export function inverseSPD(a: number[][]): number[][]; /** * Draws Haar-distributed (uniformly random) orthogonal matrices from O(n), * as `scipy.stats.ortho_group`. * * @param {number} dim - Matrix dimension. * @param {number|number[]|null} [size=null] - Output shape (each element is a matrix). * @returns {number[][]|Array} */ export function orthoGroup(dim: number, size?: number | number[] | null): number[][] | any[]; /** * Draws Haar-distributed rotation matrices from SO(n) (determinant +1), * as `scipy.stats.special_ortho_group`. * * @param {number} dim - Matrix dimension. * @param {number|number[]|null} [size=null] - Output shape (each element is a matrix). * @returns {number[][]|Array} */ export function specialOrthoGroup(dim: number, size?: number | number[] | null): number[][] | any[]; /** * Draws random correlation matrices with the given eigenvalues (Davies & Higham, 2000), * as `scipy.stats.random_correlation`. * * @param {number[]} eigs - Non-negative eigenvalues summing to their count. * @param {number|number[]|null} [size=null] - Output shape (each element is a matrix). * @returns {number[][]|Array} */ export function randomCorrelation(eigs: number[], size?: number | number[] | null): number[][] | any[]; /** * Draws correlation matrices from the LKJ distribution (Lewandowski, Kurowicka & Joe, 2009), * with density proportional to det(R)^(eta - 1). `eta = 1` is uniform over correlation * matrices; larger `eta` concentrates around the identity. The usual prior in Bayesian models. * * @param {number} dim - Matrix dimension. * @param {number} [eta=1] - Concentration (> 0). * @param {number|number[]|null} [size=null] - Output shape (each element is a matrix). * @param {boolean} [cholesky=false] - Return the lower Cholesky factor instead of the matrix. * @returns {number[][]|Array} */ export function lkjCorrelation(dim: number, eta?: number, size?: number | number[] | null, cholesky?: boolean): number[][] | any[]; /** * Draws matrices from the Wishart distribution W(df, scale) using the Bartlett decomposition, * as `scipy.stats.wishart`. The mean is df * scale. * * @param {number} df - Degrees of freedom (> dim - 1). * @param {number[][]} scale - Symmetric positive definite scale matrix. * @param {number|number[]|null} [size=null] - Output shape (each element is a matrix). * @returns {number[][]|Array} */ export function wishart(df: number, scale: number[][], size?: number | number[] | null): number[][] | any[]; /** * Draws matrices from the inverse Wishart distribution, as `scipy.stats.invwishart`. * The mean is scale / (df - dim - 1) for df > dim + 1. * * @param {number} df - Degrees of freedom (> dim - 1). * @param {number[][]} scale - Symmetric positive definite scale matrix. * @param {number|number[]|null} [size=null] - Output shape (each element is a matrix). * @returns {number[][]|Array} */ export function invWishart(df: number, scale: number[][], size?: number | number[] | null): number[][] | any[]; /** * Draws matrices from the matrix normal distribution MN(mean, rowCov, colCov): * X = mean + A Z Bᵀ with rowCov = A Aᵀ, colCov = B Bᵀ and Z standard normal, * as `scipy.stats.matrix_normal`. * * @param {number[][]} mean - n x p mean matrix. * @param {number[][]} rowCov - n x n among-row covariance. * @param {number[][]} colCov - p x p among-column covariance. * @param {number|number[]|null} [size=null] - Output shape (each element is a matrix). * @returns {number[][]|Array} */ export function matrixNormal(mean: number[][], rowCov: number[][], colCov: number[][], size?: number | number[] | null): number[][] | any[];