Skip to content

Commit c93aaba

Browse files
authored
add docstring to HODLRSolver solver (#159)
1 parent 769a713 commit c93aaba

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/george/solvers/hodlr.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,34 @@
1111

1212

1313
class HODLRSolver(BasicSolver):
14+
r"""
15+
A solver using `Sivaram Amambikasaran's HODLR algorithm
16+
<http://arxiv.org/abs/1403.6015>`_ to approximately solve the GP linear
17+
algebra in :math:`\mathcal{O}(N\,\log^2 N)`.
18+
19+
:param kernel:
20+
An instance of a subclass of :class:`kernels.Kernel`.
21+
:param min_size: (optional[int])
22+
The block size where the solver switches to a general direct
23+
factorization algorithm. This can be tuned for platform and
24+
problem specific performance and accuracy. As a general rule,
25+
larger values will be more accurate and slower, but there is some
26+
overhead for very small values, so we recommend choosing values in the
27+
hundreds. (default: ``100``)
28+
:param tol: (optional[float])
29+
The precision tolerance for the low-rank approximation.
30+
This value is used as an approximate limit on the Frobenius norm
31+
between the low-rank approximation and the true matrix
32+
when reconstructing the off-diagonal blocks. Smaller values of ``tol``
33+
will generally give more accurate results with higher computational
34+
cost. (default: ``0.1``)
35+
:param seed: (optional[int])
36+
The low-rank approximation method within the HODLR algorithm
37+
is not deterministic and, without a fixed seed, the method
38+
can give different results for the same matrix. Therefore, we require
39+
that the user provide a seed for the random number generator.
40+
(default: ``42``)
41+
"""
1442

1543
def __init__(self, kernel, min_size=100, tol=0.1, seed=42):
1644
self.min_size = min_size

0 commit comments

Comments
 (0)