Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Q2 summary interval allow float #108

Merged
merged 7 commits into from
Feb 4, 2020

Conversation

gwarmstrong
Copy link
Member

Adds the ability to use a float for summary-interval in Q2.

Would be nice to get more granular feedback for models that run very quickly, such as below:

image

Where the model converge quickly (just a couple seconds) so there are only a very few number of updates before convergence.

@gwarmstrong
Copy link
Member Author

Build failure related to #106 #107

@fedarko fedarko self-requested a review February 4, 2020 10:34
Copy link
Collaborator

@fedarko fedarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gwarmstrong Looks good! There are a few things I think could be made better (mostly minor stuff like code documentation), but by and large this should be good to go once those are addressed.

md.name = 'sampleid'
md = qiime2.Metadata(md)

exp_beta = clr(clr_inv(np.hstack((np.zeros((2, 1)), self.beta.T))))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this line (as well as a few others towards the end of this function, e.g. the npt.assert_allclose lines) were taken from test_fit() in this file. That's not a problem, but this should be commented to make that clear if possible -- the clr(clr_inv()) stuff in particular is apparently kind of a hack, and we should try to document where it's used so it could ideally be taken care of in the future.

songbird/q2/tests/test_method.py Show resolved Hide resolved
songbird/q2/tests/test_method.py Show resolved Hide resolved
res_biplot = q2_res_biplot.view(OrdinationResults)
except Exception:
raise AssertionError('res_biplot unable to be coerced to '
'OrdinationResults')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was gonna ask you to use a more specific error type than just Exception but I tried it out and, yep, you get a basic Exception when transformations fail. The more you know!

(Maaybe worth adding a comment mentioning this just so that future people reviewing this code don't have the same reaction I just did...)

.travis.yml Show resolved Hide resolved
@fedarko fedarko mentioned this pull request Feb 4, 2020
.travis.yml Show resolved Hide resolved
@fedarko fedarko merged commit 269df65 into biocore:master Feb 4, 2020
fedarko added a commit that referenced this pull request Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants