Skip to content

Commit

Permalink
Avoid diagonal matrix creation in FITC (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
relf authored Dec 21, 2023
1 parent 37bb5c1 commit 9f77f5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smt/surrogate_models/sgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _fitc(self, X, Y, Z, theta, sigma2, noise, nugget):
beta = 1.0 / nu

# Compute (lower) Cholesky decomposition: A = I + V diag(beta) V^T = L L^T
A = np.eye(self.nz) + V @ np.diag(beta) @ V.T
A = np.eye(self.nz) + V * beta @ V.T
L = linalg.cholesky(A, lower=True)
Li = linalg.inv(L)

Expand Down

0 comments on commit 9f77f5c

Please sign in to comment.