Skip to content
Snippets Groups Projects
Commit c71ddd9f authored by Jean-Baptiste Delisle's avatar Jean-Baptiste Delisle
Browse files

add performance warnings for conditional var/cov

parent 68abd1da
No related branches found
No related tags found
No related merge requests found
Pipeline #13496 passed
......@@ -699,6 +699,15 @@ class Spleaf():
Full covariance matrix (if calc_cov is True).
var : (n,) ndarray
Main diagonal of the covariance matrix (if calc_cov is 'diag').
Warnings
--------
While the computational cost of the conditional mean scales as
:math:`\mathcal{O}(n)`,
the computational cost of the variance scales as
:math:`\mathcal{O}(n^2)`,
and the computational cost of the full covariance scales as
:math:`\mathcal{O}(n^3)`.
"""
u = self.solveLT(self.solveL(y)/self.D)
......@@ -762,6 +771,15 @@ class Spleaf():
Full covariance matrix (if calc_cov is True).
var : (n2,) ndarray
Main diagonal of the covariance matrix (if calc_cov is 'diag').
Warnings
--------
While the computational cost of the conditional mean scales as
:math:`\mathcal{O}(n+n_2)`,
the computational cost of the variance scales as
:math:`\mathcal{O}(n n_2)`,
and the computational cost of the full covariance scales as
:math:`\mathcal{O}(n n_2^2)`.
"""
u = self.solveLT(self.solveL(y)/self.D)
......
......@@ -484,6 +484,15 @@ class Cov(Spleaf):
Full covariance matrix (if calc_cov is True).
var : (n2,) ndarray
Main diagonal of the covariance matrix (if calc_cov is 'diag').
Warnings
--------
While the computational cost of the conditional mean scales as
:math:`\mathcal{O}(n+n_2)`,
the computational cost of the variance scales as
:math:`\mathcal{O}(n n_2)`,
and the computational cost of the full covariance scales as
:math:`\mathcal{O}(n n_2^2)`.
"""
n2 = t2.size
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment