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

Sparse ilr #250

Merged
merged 15 commits into from
Mar 2, 2018
Merged

Sparse ilr #250

merged 15 commits into from
Mar 2, 2018

Conversation

mortonjt
Copy link
Collaborator

@mortonjt mortonjt commented Jan 28, 2018

This creates a sparse representation of an ilr basis. This will ultimately enable scalability of very high dimensional datasets.

This will replace the efforts in #8

@@ -52,7 +54,7 @@ def _balance_basis(tree_node):
basis[i, :] = np.array([0]*k[i] + [a[i]]*r[i] + [b[i]]*s[i] + [0]*t[i])
# Make sure that the basis is in level order
basis = basis[:, ::-1]
nds = list(nds)
nds = [n.name for n in nds]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that we are only keep track of names instead of entire TreeNode objects. This is to ensure consistency between the methods and immutability.

scipy.sparse.coo_matrix
The ilr basis required to perform the ilr_inv transform.
This is also known as the sequential binary partition.
Note that this matrix is represented in clr coordinates.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that this is in clr coordinates, which is the same as the _balance_basis function.

@coveralls
Copy link

coveralls commented Jan 28, 2018

Coverage Status

Coverage increased (+0.06%) to 96.634% when pulling b8210f1 on mortonjt:sparse-ilr into 5d724fc on biocore:master.

This was referenced Feb 13, 2018
@mortonjt
Copy link
Collaborator Author

mortonjt commented Mar 2, 2018

We have quite a few outstanding PRs, so let's merge this in once travis completes.

@mortonjt mortonjt merged commit 52edad9 into biocore:master Mar 2, 2018
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