Skip to content

Commit

Permalink
better sparse logdet() 2
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusMNoack committed Dec 15, 2022
1 parent 051e24a commit 8c76a23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fvgp/sparse_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .mcmc import mcmc
import torch
from dask.distributed import Variable
import math
#from scikits import umfpack
#from scikits.umfpack import spsolve, splu

Expand Down Expand Up @@ -122,7 +123,7 @@ def random_logdet(self, A,eps = 0.50, delta = 0.01,m = 100):
A.data = A.data / alpha
diag = sparse.eye(N, format="csc")
C = sparse.csc_matrix(diag - A)
p = int(20.0 * np.log(2./delta)/eps**2)+1
p = math.ceil(20.0 * np.log(2./delta)/eps**2)
gamma = np.zeros((p,m))
for i in range(p):
g = np.random.normal(0, 1., size = N)
Expand Down

0 comments on commit 8c76a23

Please sign in to comment.