API Reference#

Matrix Determinant

Functions for computing determinant and related quantities of matrices.

detkit.logdet(A[, sym_pos, overwrite_A, ...])

Compute the logdet of a matrix.

detkit.loggdet(A, X[, Xp, method, sym_pos, ...])

Compute the loggdet of a matrix.

detkit.logpdet(A, X[, Xp, method, sym_pos, ...])

Compute the logpdet of a matrix.

detkit.memdet(A[, max_mem, num_blocks, ...])

Compute log-determinant under memory constraint.

Matrix Decompositions

LU, LDL and Cholesky factorizations for sub-matrices, as well as matrix orthogonalizations.

detkit.orthogonalize(A)

Orthogonalize the columns of matrix.

detkit.ortho_complement(Xp, X[, X_orth])

Orthogonalize the columns of matrix Xp against X.

detkit.lu_factor(A[, shape, overwrite])

LU decomposition of a sub-matrix.

detkit.ldl_factor(A[, m, lower, overwrite, ...])

LDL decomposition of a sub-matrix.

detkit.cho_factor(A[, m, lower, overwrite])

Cholesky decomposition of a sub-matrix.

Solving Linear Systems

Solving linear systems for sub-matrices based on LU, LDL and Cholesky decompositions.

detkit.lu_solve(lu, perm, B[, shape, trans, ...])

Solve linear system given a sub-matrix output of LU decomposition.

detkit.ldl_solve(ldu, piv, B[, shape, ...])

Solve symmetric positive-definite linear system given a sub-matrix of LDL decomposition.

detkit.cho_solve(cho, B[, shape, lower, ...])

Solve symmetric positive-definite linear system given a sub-matrix output of Cholesky decomposition.

detkit.solve_triangular(A, B[, shape, ...])

Solve triangular linear system given a sub-matrix.

BLAS Operations

BLAS operations for sub-matrices.

detkit.matmul(A, B, C[, shape, trans_a, ...])

Matrix-matrix multiplication for sub-matrices.

Datasets

Functions to create sample dataset to be used for test and benchmarking purposes.

detkit.electrocardiogram([start, end, ...])

Load an electrocardiogram signal as an example for a 1D signal.

detkit.covariance_matrix([size, sample, ...])

Create covariance matrix based on the autocorrelation of electrocardiogram signal.

detkit.design_matrix([num_rows, num_cols, ortho])

Generate design matrix.

Profiling

Utility classes for profiling memory and process.

detkit.Memory([unit])

Trace memory allocation.

detkit.Disk([unit])

Measure read and write to disk.

detkit.Profile()

Profile a process.

Profiling Utilities

Utility functions for profiling memory and process.

detkit.get_config([key])

Returns the definitions used in the compile-time of the package.

detkit.get_instructions_per_task([task, dtype])

Counts the hardware instructions of computing a single FLOP of a benchmark task on the current processor.

detkit.get_processor_name()

Returns name of processor.

detkit.human_readable_time(t[, pad])

Converts time (in seconds) as float to string with time unit.

detkit.human_readable_mem(m[, pad])

Converts memory (in bytes) as float to string with memory unit.