xmjiao / H2Pack

H2 Matrix Package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

H2Pack is a library that provides linear-scaling storage and linear-scaling matrix-vector multiplication for dense kernel matrices. This is accomplished by storing the kernel matrices in the hierarchical block low-rank representation. It can be used for Gaussian processes, solving integral equations, Brownian dynamics, and other applications.

The main strength of H2Pack is its ability to efficiently construct matrices in linear time for kernel functions used in Gaussian processes (up to 3-D data) by using a new proxy point method. Kernel functions from computational physics, e.g., Coulomb, Stokes, can also be used. H2Pack is optimized for shared-memory multicore architectures, including the use of vectorization for evaluating kernel functions. H2Pack provides C/C++ and Python interfaces.

Notes

  • H2Pack is designed for general kernel functions, including the Gaussian, Matern, and other kernels used in statistics and machine learning. For these kernels, H2Pack computes the representation much faster, and with linear complexity, compared to algebraic approaches that rely on rank-revealing matrix decompositions.

  • For standard kernel functions from potential theory, e.g., Coulomb, Stokes, H2Pack using the proxy point method constructs a more efficient representation than approaches based on analytic expansions, like the fast multipole method (FMM), and thus has faster matrix-vector multiplication than FMM. Note that H2Pack requires a preprocessing step to construct the representation, while FMM does not need a preprocessing step. However, FMM cannot handle general kernel functions.

  • The proxy points only need to be computed once for a given kernel function, domain, and requested accuracy. These proxy points can be reused for different sets of points or data. Constructing the matrix with these proxy points only requires linear time. Alternatively, the proxy points could be selected on a surface, which corresponds to the proxy surface method that can be useful for kernel functions from potential theory.

Other Features

  • Users can provide a function that defines the kernel function or use kernels that are already built into H2Pack. Vector wrapper functions are provided to help users optimize the evaluation of their own kernel functions.
  • HSS hierarchical block low-rank representations are also available, including ULV decomposition and solve.
  • A Matlab version of H2Pack is available in this repo.

Limitations

  • Kernel functions up to 3-dimensions
  • Symmetric, translationally-invariant, non-oscillatory kernel functions
  • H2Pack currently only supports kernel matrices defined by a single set of points (i.e., square, symmetric matrices)

Main Functions

  • matrix representation construction for a kernel matrix with O(N) complexity for an N-by-N matrix
  • matrix-vector multiplication with O(N) complexity
  • matrix-matrix multiplication with O(N) complexity

References

Getting Started

Advanced Configurations and Tools

Numerical Tests

Last But Not Least

About

H2 Matrix Package

License:MIT License


Languages

Language:C 97.3%Language:C++ 1.4%Language:Python 1.0%Language:Makefile 0.4%