Skip to content

Commit

Permalink
advance to version 0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengp0 committed Mar 15, 2023
1 parent 204d435 commit 05868ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = limetr
version = 0.0.5
version = 0.0.6
description =
long_description = file: README.rst
long_description_content_type = text/x-rst
Expand All @@ -15,7 +15,7 @@ zip_safe = False
install_requires =
numpy
scipy
spmat
spmat==0.0.9
include_package_data = True
packages = find:
package_dir = = src
Expand Down
8 changes: 4 additions & 4 deletions src/limetr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def objective(self, x: NDArray) -> float:

val = 0.5*self.N*np.log(2.0*np.pi)

D = BDLMat(diags=V, lmats=Z*np.sqrt(gamma), dsizes=self.n)
D = BDLMat(dvecs=V, lmats=Z*np.sqrt(gamma), dsizes=self.n)
val += 0.5*D.logdet()
val += 0.5*R.dot(D.invdot(R))

Expand All @@ -302,7 +302,7 @@ def gradient(self, x: NDArray) -> NDArray:

# residual and variance
R = Y - F_beta
D = BDLMat(diags=V, lmats=Z*np.sqrt(gamma), dsizes=self.n)
D = BDLMat(dvecs=V, lmats=Z*np.sqrt(gamma), dsizes=self.n)

# gradient for beta
DR = D.invdot(R)
Expand Down Expand Up @@ -336,7 +336,7 @@ def hessian(self, x: NDArray) -> NDArray:
_, JF_beta, _, Z, V = self._get_nll_components(beta)

sqrt_gamma = np.sqrt(gamma)
d = BDLMat(diags=V, lmats=Z*np.sqrt(gamma), dsizes=self.n)
d = BDLMat(dvecs=V, lmats=Z*np.sqrt(gamma), dsizes=self.n)

split_idx = np.cumsum(self.n)[:-1]
v_study = np.split(V, split_idx)
Expand Down Expand Up @@ -545,7 +545,7 @@ def get_varmat(model: LimeTr):
Z = model.Z*np.sqrt(model.w)[:, None]
n = model.n
gamma = model.gamma
return BDLMat(diags=S**2, lmats=Z*np.sqrt(gamma), dsizes=n)
return BDLMat(dvecs=S**2, lmats=Z*np.sqrt(gamma), dsizes=n)


def get_marginal_rvar(model: LimeTr):
Expand Down

0 comments on commit 05868ba

Please sign in to comment.