Skip to content

Commit

Permalink
Merge pull request scikit-bio#1370 from mortonjt/patch_1002
Browse files Browse the repository at this point in the history
DOC: Adding clarification for eigenvalues for RDA
  • Loading branch information
jairideout committed Jun 6, 2016
2 parents de10810 + f136625 commit f627315
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions skbio/stats/ordination/_redundancy_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def rda(y, x, scale_Y=False, scaling=1):
-----
The algorithm is based on [1]_, \S 11.1, and is expected to
give the same results as ``rda(y, x)`` in R's package vegan.
The eigenvalues reported in vegan are re-normalized to
:math:`\sqrt{\frac{s}{n-1}}` `n` is the number of samples,
and `s` is the original eigenvalues. Here we will only return
the original eigenvalues, as recommended in [1]_.
See Also
--------
Expand Down
6 changes: 2 additions & 4 deletions skbio/stats/ordination/tests/test_redundancy_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ def test_scaling1(self):
index=self.env_ids,
columns=cropped_pc_ids)

# These are wrong. See issue #1002
proportion_explained = pd.Series([0.44275783, 0.25614586,
0.15280354, 0.10497021,
0.02873375, 0.00987052,
0.00471828],
index=self.pc_ids)
# These are wrong. See issue #1002

eigvals = pd.Series([25.897954, 14.982578, 8.937841, 6.139956,
1.680705, 0.577350, 0.275984],
index=self.pc_ids)
Expand Down Expand Up @@ -143,13 +142,12 @@ def test_scaling2(self):
index=self.env_ids,
columns=cropped_pc_ids)

# These are wrong. See issue #1002
proportion_explained = pd.Series([0.44275783, 0.25614586,
0.15280354, 0.10497021,
0.02873375, 0.00987052,
0.00471828],
index=self.pc_ids)
# These are wrong. See issue #1002

eigvals = pd.Series([25.897954, 14.982578, 8.937841, 6.139956,
1.680705, 0.577350, 0.275984],
index=self.pc_ids)
Expand Down

0 comments on commit f627315

Please sign in to comment.