{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/34526834","id":34526834,"diff_hunk":"@@ -9,23 +9,25 @@\n from __future__ import absolute_import, division, print_function\n \n import numpy as np\n+import pandas as pd\n+from scipy.linalg import svd, lstsq\n \n-from ._base import Ordination, OrdinationResults\n+from skbio._base import OrdinationResults\n from ._utils import corr, svd_rank, scale\n from skbio.util._decorator import experimental\n \n \n-class CCA(Ordination):\n-    r\"\"\"Compute constrained (also known as canonical) correspondence\n+@experimental(as_of=\"0.4.0\")\n+def cca(y, x, scaling=1):\n+    r\"\"\"Compute canonical (also known as constrained) correspondence\n     analysis.\n \n     Canonical (or constrained) correspondence analysis is a\n     multivariate ordination technique. It appeared in community\n     ecology [1]_ and relates community composition to the variation in\n     the environment (or in other factors). It works from data on\n-    abundances or counts of individuals and environmental variables,\n-    and outputs ordination axes that maximize niche separation among\n-    species.\n+    abundances or counts of samples and constraints variables,\n+    and outputs ordination axes that maximize sample separation among species.\n \n     It is better suited to extract the niches of taxa than linear","path":"skbio/stats/ordination/_canonical_correspondence_analysis.py","position":30,"original_position":30,"commit_id":"f2dfcf1ea3e788b4b1f120d6fe0fa857368235ed","original_commit_id":"f2dfcf1ea3e788b4b1f120d6fe0fa857368235ed","user":{"login":"mortonjt","id":4184797,"avatar_url":"https://avatars.githubusercontent.com/u/4184797?v=3","gravatar_id":"","url":"https://api.github.com/users/mortonjt","html_url":"https://github.com/mortonjt","followers_url":"https://api.github.com/users/mortonjt/followers","following_url":"https://api.github.com/users/mortonjt/following{/other_user}","gists_url":"https://api.github.com/users/mortonjt/gists{/gist_id}","starred_url":"https://api.github.com/users/mortonjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortonjt/subscriptions","organizations_url":"https://api.github.com/users/mortonjt/orgs","repos_url":"https://api.github.com/users/mortonjt/repos","events_url":"https://api.github.com/users/mortonjt/events{/privacy}","received_events_url":"https://api.github.com/users/mortonjt/received_events","type":"User","site_admin":false},"body":"Just stating something that I should be addressed later, but not in this PR.\r\n\r\nThe term \"niche\" is incredibly ambiguous.  What exactly is the meaning here?\r\nI'm not sure if there is an accepted standard definition for this term, and we may either want to clarify this or drop it in a future PR. ","created_at":"2015-07-14T00:15:39Z","updated_at":"2015-07-14T00:15:39Z","html_url":"https://github.com/biocore/scikit-bio/pull/925#discussion_r34526834","pull_request_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/925","_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/34526834"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/925#discussion_r34526834"},"pull_request":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/925"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/925","id":35356776,"html_url":"https://github.com/biocore/scikit-bio/pull/925","diff_url":"https://github.com/biocore/scikit-bio/pull/925.diff","patch_url":"https://github.com/biocore/scikit-bio/pull/925.patch","issue_url":"https://api.github.com/repos/biocore/scikit-bio/issues/925","number":925,"state":"open","locked":false,"title":"Update OrdinationResults class","user":{"login":"ElDeveloper","id":375307,"avatar_url":"https://avatars.githubusercontent.com/u/375307?v=3","gravatar_id":"","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"body":"**Do not merge**\r\n\r\nFixes #521\r\n\r\nto-do before merge:\r\n\r\n- [x] update PCoA method and tests (@jairideout)\r\n- [x] update RDA method and tests (@mortonjt)\r\n- [x] update CA method and tests (@ElDeveloper)\r\n- [x] update CCA method and tests (@josenavas / @mortonjt)\r\n- [x] fix broken `OrdinationResults.__str__` method and update tests to catch this failure\r\n- [x] fix coverage issues (definitely `skbio.util.assert_ordination_results_equal`, possibly others). Rewrite unit tests to cover new keyword arguments (@ebolyen)\r\n- [x] test methods against vegan package test data. Important: make sure the constrained methods (CCA, RDA) either 1) report *only* constrained axes **OR** 2) if they report both constrained and unconstrained axes, the axes are labeled correctly.\r\n- [x] fix RDA eigenvalues bug (@Jorge-C)\r\n- [x] get all tests to pass\r\n- [x] investigate using `scipy.linalg` wherever `numpy.linalg` is used (see [here](http://docs.scipy.org/doc/scipy/reference/tutorial/linalg.html#scipy-linalg-vs-numpy-linalg) for reasons why we want to do this)\r\n- [ ] detailed review from anyone available\r\n- [ ] ask @Jorge-C to review specific sections of the docs (ideally all changes if possible). We'll add comments to specific parts of the docs that need review","created_at":"2015-05-13T18:34:48Z","updated_at":"2015-07-14T00:15:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d351fd47fdee343edb85c1e0f6557118fd5fba3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/925/commits","review_comments_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/925/comments","review_comment_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/issues/925/comments","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/f2dfcf1ea3e788b4b1f120d6fe0fa857368235ed","head":{"label":"ElDeveloper:issue-521","ref":"issue-521","sha":"f2dfcf1ea3e788b4b1f120d6fe0fa857368235ed","user":{"login":"ElDeveloper","id":375307,"avatar_url":"https://avatars.githubusercontent.com/u/375307?v=3","gravatar_id":"","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"repo":{"id":15595852,"name":"biolopy","full_name":"ElDeveloper/biolopy","owner":{"login":"ElDeveloper","id":375307,"avatar_url":"https://avatars.githubusercontent.com/u/375307?v=3","gravatar_id":"","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ElDeveloper/biolopy","description":"Tools for biological data analysis in python.","fork":true,"url":"https://api.github.com/repos/ElDeveloper/biolopy","forks_url":"https://api.github.com/repos/ElDeveloper/biolopy/forks","keys_url":"https://api.github.com/repos/ElDeveloper/biolopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ElDeveloper/biolopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ElDeveloper/biolopy/teams","hooks_url":"https://api.github.com/repos/ElDeveloper/biolopy/hooks","issue_events_url":"https://api.github.com/repos/ElDeveloper/biolopy/issues/events{/number}","events_url":"https://api.github.com/repos/ElDeveloper/biolopy/events","assignees_url":"https://api.github.com/repos/ElDeveloper/biolopy/assignees{/user}","branches_url":"https://api.github.com/repos/ElDeveloper/biolopy/branches{/branch}","tags_url":"https://api.github.com/repos/ElDeveloper/biolopy/tags","blobs_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ElDeveloper/biolopy/statuses/{sha}","languages_url":"https://api.github.com/repos/ElDeveloper/biolopy/languages","stargazers_url":"https://api.github.com/repos/ElDeveloper/biolopy/stargazers","contributors_url":"https://api.github.com/repos/ElDeveloper/biolopy/contributors","subscribers_url":"https://api.github.com/repos/ElDeveloper/biolopy/subscribers","subscription_url":"https://api.github.com/repos/ElDeveloper/biolopy/subscription","commits_url":"https://api.github.com/repos/ElDeveloper/biolopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ElDeveloper/biolopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ElDeveloper/biolopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ElDeveloper/biolopy/contents/{+path}","compare_url":"https://api.github.com/repos/ElDeveloper/biolopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ElDeveloper/biolopy/merges","archive_url":"https://api.github.com/repos/ElDeveloper/biolopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ElDeveloper/biolopy/downloads","issues_url":"https://api.github.com/repos/ElDeveloper/biolopy/issues{/number}","pulls_url":"https://api.github.com/repos/ElDeveloper/biolopy/pulls{/number}","milestones_url":"https://api.github.com/repos/ElDeveloper/biolopy/milestones{/number}","notifications_url":"https://api.github.com/repos/ElDeveloper/biolopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ElDeveloper/biolopy/labels{/name}","releases_url":"https://api.github.com/repos/ElDeveloper/biolopy/releases{/id}","created_at":"2014-01-02T22:53:46Z","updated_at":"2015-04-24T17:48:21Z","pushed_at":"2015-07-13T23:32:14Z","git_url":"git://github.com/ElDeveloper/biolopy.git","ssh_url":"git@github.com:ElDeveloper/biolopy.git","clone_url":"https://github.com/ElDeveloper/biolopy.git","svn_url":"https://github.com/ElDeveloper/biolopy","homepage":"https://github.com/biocore/bipy","size":20465,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biocore:master","ref":"master","sha":"427f94db5cad9059c1b8e8651599f91f4ed17af0","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":15168264,"name":"scikit-bio","full_name":"biocore/scikit-bio","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/scikit-bio","description":"Core objects, functions and statistics for working with biological data in Python.","fork":false,"url":"https://api.github.com/repos/biocore/scikit-bio","forks_url":"https://api.github.com/repos/biocore/scikit-bio/forks","keys_url":"https://api.github.com/repos/biocore/scikit-bio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/scikit-bio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/scikit-bio/teams","hooks_url":"https://api.github.com/repos/biocore/scikit-bio/hooks","issue_events_url":"https://api.github.com/repos/biocore/scikit-bio/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/scikit-bio/events","assignees_url":"https://api.github.com/repos/biocore/scikit-bio/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/scikit-bio/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/scikit-bio/tags","blobs_url":"https://api.github.com/repos/biocore/scikit-bio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/scikit-bio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/scikit-bio/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/scikit-bio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/scikit-bio/languages","stargazers_url":"https://api.github.com/repos/biocore/scikit-bio/stargazers","contributors_url":"https://api.github.com/repos/biocore/scikit-bio/contributors","subscribers_url":"https://api.github.com/repos/biocore/scikit-bio/subscribers","subscription_url":"https://api.github.com/repos/biocore/scikit-bio/subscription","commits_url":"https://api.github.com/repos/biocore/scikit-bio/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/scikit-bio/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/scikit-bio/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/scikit-bio/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/scikit-bio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/scikit-bio/merges","archive_url":"https://api.github.com/repos/biocore/scikit-bio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/scikit-bio/downloads","issues_url":"https://api.github.com/repos/biocore/scikit-bio/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/scikit-bio/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/scikit-bio/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/scikit-bio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/scikit-bio/labels{/name}","releases_url":"https://api.github.com/repos/biocore/scikit-bio/releases{/id}","created_at":"2013-12-13T16:24:41Z","updated_at":"2015-07-12T22:55:26Z","pushed_at":"2015-07-13T23:32:16Z","git_url":"git://github.com/biocore/scikit-bio.git","ssh_url":"git@github.com:biocore/scikit-bio.git","clone_url":"https://github.com/biocore/scikit-bio.git","svn_url":"https://github.com/biocore/scikit-bio","homepage":"http://scikit-bio.org","size":41226,"stargazers_count":140,"watchers_count":140,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":75,"mirror_url":null,"open_issues_count":128,"forks":75,"open_issues":128,"watchers":140,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/925"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/925"},"issue":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/925"},"comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/925/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/925/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/925/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/scikit-bio/statuses/f2dfcf1ea3e788b4b1f120d6fe0fa857368235ed"}}}}