Skip to content

Commit

Permalink
Merge branch 'release/1.2.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
horta committed Jul 5, 2017
2 parents 4235b3f + 47706ce commit c37c17b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions glimix_core/lmm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from numpy import dot, log, maximum, sqrt, zeros
from numpy_sugar import epsilon
from numpy_sugar.linalg import ddot, economic_svd, solve
from numpy_sugar.linalg import ddot, economic_svd, rsolve, solve

from .scan import FastScanner

Expand All @@ -23,6 +23,7 @@ def get_fast_scanner(self):

@property
def X(self):
# m = self.m
return dot(self._svd[0], ddot(self._svd[1], self._svd[2], left=True))

@X.setter
Expand Down Expand Up @@ -54,7 +55,10 @@ def _tbeta(self, value):

@property
def beta(self):
return solve(self._svd[2].T, self._tbeta / sqrt(self._svd[1]))
SVs = ddot(self._svd[0], sqrt(self._svd[1]), left=False)
z = rsolve(SVs, self.m)
VsD = ddot(sqrt(self._svd[1]), self._svd[2], left=True)
return rsolve(VsD, z)

@beta.setter
def beta(self, value):
Expand Down
3 changes: 3 additions & 0 deletions glimix_core/lmm/test/test_lmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def test_fastlmm_fast_scan_redundant(): # pylint: disable=R0914
],
rtol=1e-5)

lmm.beta
pass


def test_lmm_learn():
random = RandomState(9458)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def setup_package():

metadata = dict(
name='glimix-core',
version='1.2.17',
version='1.2.18',
maintainer="Limix Developers",
maintainer_email="horta@ebi.ac.uk",
license="MIT",
Expand Down

0 comments on commit c37c17b

Please sign in to comment.