{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaStats/Clustering.jl/issues/49","labels_url":"https://api.github.com/repos/JuliaStats/Clustering.jl/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/Clustering.jl/issues/49/comments","events_url":"https://api.github.com/repos/JuliaStats/Clustering.jl/issues/49/events","html_url":"https://github.com/JuliaStats/Clustering.jl/pull/49","id":93749555,"number":49,"title":"Implementation for issue #48","user":{"login":"jumutc","id":4447406,"avatar_url":"https://avatars.githubusercontent.com/u/4447406?v=3","gravatar_id":"","url":"https://api.github.com/users/jumutc","html_url":"https://github.com/jumutc","followers_url":"https://api.github.com/users/jumutc/followers","following_url":"https://api.github.com/users/jumutc/following{/other_user}","gists_url":"https://api.github.com/users/jumutc/gists{/gist_id}","starred_url":"https://api.github.com/users/jumutc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jumutc/subscriptions","organizations_url":"https://api.github.com/users/jumutc/orgs","repos_url":"https://api.github.com/users/jumutc/repos","events_url":"https://api.github.com/users/jumutc/events{/privacy}","received_events_url":"https://api.github.com/users/jumutc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-08T09:47:02Z","updated_at":"2015-07-08T20:47:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaStats/Clustering.jl/pulls/49","html_url":"https://github.com/JuliaStats/Clustering.jl/pull/49","diff_url":"https://github.com/JuliaStats/Clustering.jl/pull/49.diff","patch_url":"https://github.com/JuliaStats/Clustering.jl/pull/49.patch"},"body":"I have taken and refactored a bit implementation for issue https://github.com/JuliaStats/Clustering.jl/issues/48 from the [MATLAB](http://www.mathworks.com/matlabcentral/fileexchange/13916--simple--tool-for-estimating-the-number-of-clusters/content/valid_RandIndex.m) central"},"comment":{"url":"https://api.github.com/repos/JuliaStats/Clustering.jl/issues/comments/119726780","html_url":"https://github.com/JuliaStats/Clustering.jl/pull/49#issuecomment-119726780","issue_url":"https://api.github.com/repos/JuliaStats/Clustering.jl/issues/49","id":119726780,"user":{"login":"jpfairbanks","id":2753998,"avatar_url":"https://avatars.githubusercontent.com/u/2753998?v=3","gravatar_id":"","url":"https://api.github.com/users/jpfairbanks","html_url":"https://github.com/jpfairbanks","followers_url":"https://api.github.com/users/jpfairbanks/followers","following_url":"https://api.github.com/users/jpfairbanks/following{/other_user}","gists_url":"https://api.github.com/users/jpfairbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/jpfairbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpfairbanks/subscriptions","organizations_url":"https://api.github.com/users/jpfairbanks/orgs","repos_url":"https://api.github.com/users/jpfairbanks/repos","events_url":"https://api.github.com/users/jpfairbanks/events{/privacy}","received_events_url":"https://api.github.com/users/jpfairbanks/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T20:47:32Z","updated_at":"2015-07-08T20:47:32Z","body":"going though the math I was a a little confused comparing to the formula on the wikipedia page linked to in the source.\r\n\r\nIt appears simpler to write something like:\r\n```julia\r\nA = 0\r\nfor i in 1:size(c,1)\r\n    for j in 1:size(c,2)\r\n        A += binom(c[i,j], 2)\r\n    end\r\nend\r\n\r\na = sum(c,1)\r\nb = sum(c,2)\r\nnc = 0\r\nabinoms = [binom(a[i],2) for i in 1:size(c,1)]\r\nbbinoms = [binom(b[j],2) for j in 1:size(c,2)]\r\n\r\nfor i in size(c,1)\r\n    for j in size(c,2)\r\n        nc += abinoms[i] * bbinoms[j]\r\n    end\r\nend\r\nnc = nc / binom(n,2)\r\n```\r\n\r\nAm I missing something important?"}}