Skip to content

Commit

Permalink
Merge pull request #36 from biocore/fix_arrow_scaling
Browse files Browse the repository at this point in the history
Adding tests, documentation, arrow scaling issue
  • Loading branch information
cameronmartino authored Jul 3, 2019
2 parents 0d480ce + 6d35e76 commit d33a03a
Show file tree
Hide file tree
Showing 21 changed files with 5,162 additions and 5,076 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ branch = True
include = */deicode/*

[report]
show_missing = True
exclude_lines =
pragma: no cover
raise NotImplementedError
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# DEICODE changelog

## Version 0.2.3 (2019-6-18)

### Backward-incompatible changes [stable]

* The following option names have changed when running DEICODE:
(this is true for both QIIME2, python, and the standalone interfaces)

| Original Name | New Name |
| -------------------- | -------------------- |
| `--rank` | `--n_components` |
| `--iterations` | `--max_iterations` |

* `deicode.optspace` has been replaced by `deicode.matrix_completion`.
* `deicode.optspace.OptSapce` has been replaced by `deicode.matrix_completion.MatrixCompletion`.
* `deicode._optspace` has been replaced by `deicode.optspace`.
* `deicode._optspace.optspace` has been replaced by `deicode.optspace.OptSpace`.

### Performance enhancements

* Updated `deicode.optspace.OptSpace.svd_sort` to be readable and included
comments to make the code easier to follow
* Added several tests that were missing for ValueError(s) to get better code coverage

### Bug fixes

* Arrow scaling issues [first raised here](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497).
* this was caused by some bit of code that was borrowed from sklearn in
`deicode.optspace.OptSpace.svd_sort`. Just deleting a few lines fixed it.

## Version 0.2.2 (2019-4-22)

### Features
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Usage: deicode [OPTIONS]
Options:
--in-biom TEXT Input table in biom format. [required]
--output-dir TEXT Location of output files. [required]
--rank INTEGER The underlying low-rank structure (suggested: 1
--n_components INTEGER The underlying low-rank structure (suggested: 1
< rank < 10) [minimum 2] [default: 3]
--min-sample-count INTEGER Minimum sum cutoff of sample across all
features [default: 500]
--min-feature-count INTEGER Minimum sum cutoff of features across all
samples [default: 10]
--iterations INTEGER The number of iterations to optimize the
--max_iterations INTEGER The number of iterations to optimize the
solution (suggested to be below 100; beware of
overfitting) [minimum 1] [default: 5]
--help Show this message and exit.
Expand Down
2 changes: 1 addition & 1 deletion deicode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
#
# ----------------------------------------------------------------------------

__version__ = "0.2.2"
__version__ = "0.2.3"
237 changes: 0 additions & 237 deletions deicode/_optspace.py

This file was deleted.

17 changes: 0 additions & 17 deletions deicode/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,3 @@ def transform(self):
""" Apply imputation to X_sparse
"""
return self.sample_weights


class _BaseTransform(object):

"""Base class for transformation/norm methods.
Warning: This class should not be used directly.
Use derived classes instead.
"""
@abstractmethod
def fit(self):
""" Placeholder for fit this
should be implemented by sub-method"""

def transform(self):
""" Apply imputation to X_sparse
"""
return self.X_sp
Loading

0 comments on commit d33a03a

Please sign in to comment.