Skip to content

Commit

Permalink
Merge pull request #105 from biocore/mortonjt-patch-3
Browse files Browse the repository at this point in the history
Update _mixedlm.py
  • Loading branch information
qiyunzhu authored Feb 2, 2017
2 parents 720f794 + cd9c12a commit 3a16207
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions gneiss/regression/_mixedlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,9 @@ def __init__(self, *args, **kwargs):

def fit(self, **kwargs):
""" Fit the model """
for s in self.submodels:
# assumes that the underlying submodels have implemented `fit`.
# TODO: Add regularized fit
m = s.fit(**kwargs)
self.results.append(m)
# assumes that the underlying submodels have implemented `fit`.
# TODO: Add regularized fit
self.results = [s.fit(**kwargs) for s in self.submodels]

def summary(self, ndim=10):
""" Summarize the Ordinary Least Squares Regression Results.
Expand Down Expand Up @@ -225,7 +223,7 @@ def summary(self, ndim=10):
pvals.insert(0, ' ', ['pvalue']*pvals.shape[0])
scores = pd.concat((coefs, pvals))
scores = scores.sort_values(by=' ', ascending=False)
scores = scores.sort_index()
scores = scores.sort_index(kind='mergesort')

def _format(x):
# format scores to be printable
Expand Down

0 comments on commit 3a16207

Please sign in to comment.