{"action":"created","issue":{"url":"https://api.github.com/repos/mwaskom/seaborn/issues/621","labels_url":"https://api.github.com/repos/mwaskom/seaborn/issues/621/labels{/name}","comments_url":"https://api.github.com/repos/mwaskom/seaborn/issues/621/comments","events_url":"https://api.github.com/repos/mwaskom/seaborn/issues/621/events","html_url":"https://github.com/mwaskom/seaborn/pull/621","id":92611004,"number":621,"title":"Compute linkage correctly when fastcluster is not installed","user":{"login":"marcelm","id":724864,"avatar_url":"https://avatars.githubusercontent.com/u/724864?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelm","html_url":"https://github.com/marcelm","followers_url":"https://api.github.com/users/marcelm/followers","following_url":"https://api.github.com/users/marcelm/following{/other_user}","gists_url":"https://api.github.com/users/marcelm/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelm/subscriptions","organizations_url":"https://api.github.com/users/marcelm/orgs","repos_url":"https://api.github.com/users/marcelm/repos","events_url":"https://api.github.com/users/marcelm/events{/privacy}","received_events_url":"https://api.github.com/users/marcelm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-02T11:06:11Z","updated_at":"2015-07-02T16:38:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mwaskom/seaborn/pulls/621","html_url":"https://github.com/mwaskom/seaborn/pull/621","diff_url":"https://github.com/mwaskom/seaborn/pull/621.diff","patch_url":"https://github.com/mwaskom/seaborn/pull/621.patch"},"body":"To reproduce the problem this PR tries to fix, create a virtualenv without fastcluster and run [the code in this clustermap example](http://stanford.edu/~mwaskom/software/seaborn/examples/structured_heatmap.html). The rows and columns will be sorted in a different way than what is shown on that page.\r\n\r\nWhen fastcluster is not installed, `_calculate_linkage_scipy` is used to\r\ncompute linkages. It contains an erroneous call to squareform().\r\ndistance.pdist() already returns a condensed distance matrix that is\r\nrequired as input for the linkage() function. Converting it to a matrix\r\nwith squareform() is possible and linkage() will accept the resulting\r\nmatrix, but consider it to be a list of vectors of observations and run\r\ndistance.pdist() again on it. Thus, we get a linkage based on distances\r\nbetween distances.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mwaskom/seaborn/issues/comments/118088610","html_url":"https://github.com/mwaskom/seaborn/pull/621#issuecomment-118088610","issue_url":"https://api.github.com/repos/mwaskom/seaborn/issues/621","id":118088610,"user":{"login":"olgabot","id":806256,"avatar_url":"https://avatars.githubusercontent.com/u/806256?v=3","gravatar_id":"","url":"https://api.github.com/users/olgabot","html_url":"https://github.com/olgabot","followers_url":"https://api.github.com/users/olgabot/followers","following_url":"https://api.github.com/users/olgabot/following{/other_user}","gists_url":"https://api.github.com/users/olgabot/gists{/gist_id}","starred_url":"https://api.github.com/users/olgabot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olgabot/subscriptions","organizations_url":"https://api.github.com/users/olgabot/orgs","repos_url":"https://api.github.com/users/olgabot/repos","events_url":"https://api.github.com/users/olgabot/events{/privacy}","received_events_url":"https://api.github.com/users/olgabot/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T16:38:38Z","updated_at":"2015-07-02T16:38:38Z","body":"Oh wow I didn't realize that was a bug! thanks for catching it\n\nOn Thu, Jul 2, 2015 at 7:47 AM Michael Waskom <notifications@github.com>\nwrote:\n\n> cc @olgabot <https://github.com/olgabot>\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/mwaskom/seaborn/pull/621#issuecomment-118055937>.\n>\n"}}