GitHub PullRequestReviewCommentEvent at 2014-11-13 23:27:45
Repository: scikit-learn
Actor: jnothman
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/20332058","id":20332058,"diff_hunk":"@@ -0,0 +1,95 @@\n+\"\"\"\n+=================================\n+Compare BIRCH and MiniBatchKMeans\n+=================================\n+\n+This example compares the timing of Birch (with and without the global\n+clustering step) and MiniBatchKMeans on a synthetic dataset having\n+100,000 samples and 2 features generated using make_blobs.\n+\"\"\"\n+\n+# Authors: Manoj Kumar <manojkumarsivaraj334@gmail.com\n+#          Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n+# License: BSD 3 clause\n+\n+print(__doc__)\n+\n+from itertools import cycle\n+from time import time\n+import numpy as np\n+import matplotlib.pyplot as plt\n+\n+from sklearn.cluster import Birch, MiniBatchKMeans\n+from sklearn.datasets.samples_generator import make_blobs\n+\n+\n+# Generate centres for the blobs so that it forms a 10 X 10 grid.","path":"examples/cluster/plot_birch_vs_minibatchkmeans.py","position":26,"original_position":26,"commit_id":"7e4a2615d57fe2c2d8a5ce7ea9df224b34f6f753","original_commit_id":"7e4a2615d57fe2c2d8a5ce7ea9df224b34f6f753","user":{"login":"jnothman","id":78827,"avatar_url":"https://avatars.githubusercontent.com/u/78827?v=3","gravatar_id":"","url":"https://api.github.com/users/jnothman","html_url":"https://github.com/jnothman","followers_url":"https://api.github.com/users/jnothman/followers","following_url":"https://api.github.com/users/jnothman/following{/other_user}","gists_url":"https://api.github.com/users/jnothman/gists{/gist_id}","starred_url":"https://api.github.com/users/jnothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnothman/subscriptions","organizations_url":"https://api.github.com/users/jnothman/orgs","repos_url":"https://api.github.com/users/jnothman/repos","events_url":"https://api.github.com/users/jnothman/events{/privacy}","received_events_url":"https://api.github.com/users/jnothman/received_events","type":"User","site_admin":false},"body":"Unfortunately, we should adhere to American English spelling and use `centers`. Otherwise it is inconsistent with the API and adds confusion.","created_at":"2014-11-13T23:27:45Z","updated_at":"2014-11-13T23:27:45Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/3802#discussion_r20332058","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/3802","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/20332058"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/3802#discussion_r20332058"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/3802"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/3802","id":23308585,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/3802","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/3802.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/3802.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/3802","number":3802,"state":"open","locked":false,"title":"[MRG+1] Clustering algorithm - BIRCH ","user":{"login":"MechCoder","id":1867024,"avatar_url":"https://avatars.githubusercontent.com/u/1867024?v=3","gravatar_id":"","url":"https://api.github.com/users/MechCoder","html_url":"https://github.com/MechCoder","followers_url":"https://api.github.com/users/MechCoder/followers","following_url":"https://api.github.com/users/MechCoder/following{/other_user}","gists_url":"https://api.github.com/users/MechCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/MechCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MechCoder/subscriptions","organizations_url":"https://api.github.com/users/MechCoder/orgs","repos_url":"https://api.github.com/users/MechCoder/repos","events_url":"https://api.github.com/users/MechCoder/events{/privacy}","received_events_url":"https://api.github.com/users/MechCoder/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/scikit-learn/scikit-learn/issues/2690\r\n\r\nThe design is similar to the Java code written here https://code.google.com/p/jbirch/\r\nI am pretty much sure it works (If the JAVA implementation is correct, ofc), since I get the same clusters for both cases. I opened this as a Proof of Concept.\r\n\r\nThis example has been modified, http://scikit-learn.org/stable/auto_examples/cluster/plot_mini_batch_kmeans.html\r\n \r\nWhen `threshold` is set to 3.0\r\n\r\n![figure_1](https://cloud.githubusercontent.com/assets/1867024/4772737/1dd8604a-5b9b-11e4-800d-aea031410a30.png)\r\n\r\nWhen `threshold` is set to 1.0\r\n\r\n![figure_2](https://cloud.githubusercontent.com/assets/1867024/4772748/2e46daec-5b9b-11e4-8f49-672b0ada17b7.png)\r\n\r\nTODO: A LOT\r\n\r\n- [x] Make it as fast as possible.\r\n- [x] Support for sparse matrices.\r\n- [x] Extensive testing.\r\n- [x] Make the common tests pass, for now I have added it to `dont_test` ;)\r\n- [x] Narrative documentation\r\n\r\nAwating some initial feedback!\r\n\r\n ","created_at":"2014-10-24T16:42:20Z","updated_at":"2014-11-13T23:27:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"984580140986d15c087cf05e53354cb43c227cbd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/3802/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/3802/comments","review_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/3802/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/7e4a2615d57fe2c2d8a5ce7ea9df224b34f6f753","head":{"label":"MechCoder:birch","ref":"birch","sha":"7e4a2615d57fe2c2d8a5ce7ea9df224b34f6f753","user":{"login":"MechCoder","id":1867024,"avatar_url":"https://avatars.githubusercontent.com/u/1867024?v=3","gravatar_id":"","url":"https://api.github.com/users/MechCoder","html_url":"https://github.com/MechCoder","followers_url":"https://api.github.com/users/MechCoder/followers","following_url":"https://api.github.com/users/MechCoder/following{/other_user}","gists_url":"https://api.github.com/users/MechCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/MechCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MechCoder/subscriptions","organizations_url":"https://api.github.com/users/MechCoder/orgs","repos_url":"https://api.github.com/users/MechCoder/repos","events_url":"https://api.github.com/users/MechCoder/events{/privacy}","received_events_url":"https://api.github.com/users/MechCoder/received_events","type":"User","site_admin":false},"repo":{"id":9655682,"name":"scikit-learn","full_name":"MechCoder/scikit-learn","owner":{"login":"MechCoder","id":1867024,"avatar_url":"https://avatars.githubusercontent.com/u/1867024?v=3","gravatar_id":"","url":"https://api.github.com/users/MechCoder","html_url":"https://github.com/MechCoder","followers_url":"https://api.github.com/users/MechCoder/followers","following_url":"https://api.github.com/users/MechCoder/following{/other_user}","gists_url":"https://api.github.com/users/MechCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/MechCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MechCoder/subscriptions","organizations_url":"https://api.github.com/users/MechCoder/orgs","repos_url":"https://api.github.com/users/MechCoder/repos","events_url":"https://api.github.com/users/MechCoder/events{/privacy}","received_events_url":"https://api.github.com/users/MechCoder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MechCoder/scikit-learn","description":"Work in Progress","fork":true,"url":"https://api.github.com/repos/MechCoder/scikit-learn","forks_url":"https://api.github.com/repos/MechCoder/scikit-learn/forks","keys_url":"https://api.github.com/repos/MechCoder/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MechCoder/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MechCoder/scikit-learn/teams","hooks_url":"https://api.github.com/repos/MechCoder/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/MechCoder/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/MechCoder/scikit-learn/events","assignees_url":"https://api.github.com/repos/MechCoder/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/MechCoder/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/MechCoder/scikit-learn/tags","blobs_url":"https://api.github.com/repos/MechCoder/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MechCoder/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MechCoder/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/MechCoder/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MechCoder/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/MechCoder/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/MechCoder/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/MechCoder/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/MechCoder/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/MechCoder/scikit-learn/subscription","commits_url":"https://api.github.com/repos/MechCoder/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/MechCoder/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/MechCoder/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/MechCoder/scikit-learn/issues/comments/{number}","contents_url":"https://api.github.com/repos/MechCoder/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/MechCoder/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MechCoder/scikit-learn/merges","archive_url":"https://api.github.com/repos/MechCoder/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MechCoder/scikit-learn/downloads","issues_url":"https://api.github.com/repos/MechCoder/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/MechCoder/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/MechCoder/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/MechCoder/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MechCoder/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/MechCoder/scikit-learn/releases{/id}","created_at":"2013-04-24T19:16:18Z","updated_at":"2014-07-17T15:12:34Z","pushed_at":"2014-11-13T16:28:56Z","git_url":"git://github.com/MechCoder/scikit-learn.git","ssh_url":"git@github.com:MechCoder/scikit-learn.git","clone_url":"https://github.com/MechCoder/scikit-learn.git","svn_url":"https://github.com/MechCoder/scikit-learn","homepage":"http://scikit-learn.org","size":58664,"stargazers_count":0,"watchers_count":0,"language":"C","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":"scikit-learn:master","ref":"master","sha":"158d61ffd40e2dcd4479eb2361e24face31c9df9","user":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"repo":{"id":843222,"name":"scikit-learn","full_name":"scikit-learn/scikit-learn","owner":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-learn/scikit-learn","description":"scikit-learn: machine learning in Python","fork":false,"url":"https://api.github.com/repos/scikit-learn/scikit-learn","forks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/forks","keys_url":"https://api.github.com/repos/scikit-learn/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-learn/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-learn/scikit-learn/teams","hooks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/events","assignees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-learn/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/tags","blobs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-learn/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscription","commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/{number}","contents_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-learn/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-learn/scikit-learn/merges","archive_url":"https://api.github.com/repos/scikit-learn/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-learn/scikit-learn/downloads","issues_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-learn/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/scikit-learn/scikit-learn/releases{/id}","created_at":"2010-08-17T09:43:38Z","updated_at":"2014-11-13T22:11:13Z","pushed_at":"2014-11-13T20:31:22Z","git_url":"git://github.com/scikit-learn/scikit-learn.git","ssh_url":"git@github.com:scikit-learn/scikit-learn.git","clone_url":"https://github.com/scikit-learn/scikit-learn.git","svn_url":"https://github.com/scikit-learn/scikit-learn","homepage":"http://scikit-learn.org","size":124132,"stargazers_count":4308,"watchers_count":4308,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2447,"mirror_url":null,"open_issues_count":535,"forks":2447,"open_issues":535,"watchers":4308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/3802"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/3802"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/3802"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/3802/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/3802/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/3802/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/7e4a2615d57fe2c2d8a5ce7ea9df224b34f6f753"}}}}