{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/42178232","id":42178232,"diff_hunk":"@@ -189,11 +189,11 @@ class LSHForest(BaseEstimator, KNeighborsMixin, RadiusNeighborsMixin):\n \n       >>> X_train = [[5, 5, 2], [21, 5, 5], [1, 1, 1], [8, 9, 1], [6, 10, 2]]\n       >>> X_test = [[9, 1, 6], [3, 1, 10], [7, 10, 3]]\n-      >>> lshf = LSHForest()\n+      >>> lshf = LSHForest(random_state=42)\n       >>> lshf.fit(X_train)  # doctest: +NORMALIZE_WHITESPACE\n       LSHForest(min_hash_match=4, n_candidates=50, n_estimators=10,","path":"sklearn/neighbors/approximate.py","position":7,"original_position":7,"commit_id":"daf41d02c75282127c909b32bb5f1951854184dc","original_commit_id":"daf41d02c75282127c909b32bb5f1951854184dc","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":"happy because it's not a great example of the approximation, but nothing\nwill be. better that it shows the user the available params\n\nOn 16 October 2015 at 07:46, Joel Nothman <joel.nothman@gmail.com> wrote:\n\n> Actually, I'm happy as it is.\n>\n> On 16 October 2015 at 07:46, Joel Nothman <joel.nothman@gmail.com> wrote:\n>\n>> It's not currently using 10, 10. I'm happy with the defaults... or 2, 3.\n>>\n>> On 16 October 2015 at 06:12, Loïc Estève <notifications@github.com>\n>> wrote:\n>>\n>>> In sklearn/neighbors/approximate.py\n>>> <https://github.com/scikit-learn/scikit-learn/pull/5402#discussion_r42167212>\n>>> :\n>>>\n>>> > @@ -189,11 +189,11 @@ class LSHForest(BaseEstimator, KNeighborsMixin, RadiusNeighborsMixin):\n>>> >\n>>> >        >>> X_train = [[5, 5, 2], [21, 5, 5], [1, 1, 1], [8, 9, 1], [6, 10, 2]]\n>>> >        >>> X_test = [[9, 1, 6], [3, 1, 10], [7, 10, 3]]\n>>> > -      >>> lshf = LSHForest()\n>>> > +      >>> lshf = LSHForest(random_state=42)\n>>> >        >>> lshf.fit(X_train)  # doctest: +NORMALIZE_WHITESPACE\n>>> >        LSHForest(min_hash_match=4, n_candidates=50, n_estimators=10,\n>>>\n>>> I would use n_candidates=10, n_estimators=10 (the default values).\n>>>\n>>> That's what the doctest is currently using but @jnothman\n>>> <https://github.com/jnothman> was saying that it doesn't really make\n>>> sense given that the data in the doctest example is tiny:\n>>>\n>>> >>> X_train = [[5, 5, 2], [21, 5, 5], [1, 1, 1], [8, 9, 1], [6, 10, 2]]\n>>> >>> X_test = [[9, 1, 6], [3, 1, 10], [7, 10, 3]]\n>>>\n>>> Quoting him from #5324\n>>> <https://github.com/scikit-learn/scikit-learn/issues/5324>:\n>>>\n>>> Oh! Apparently this example is reporting the exact nearest neighbors due\n>>> to very generous parameters (n_candidates, n_estimators are both high with\n>>> respect to the tiny data). We should be reducing the parameters and fixing\n>>> random_state.\n>>>\n>>> Here is the full doctest (from master) in case it helps:\n>>>\n>>> >>> from sklearn.neighbors import LSHForest\n>>>\n>>> >>> X_train = [[5, 5, 2], [21, 5, 5], [1, 1, 1], [8, 9, 1], [6, 10, 2]]\n>>> >>> X_test = [[9, 1, 6], [3, 1, 10], [7, 10, 3]]\n>>> >>> lshf = LSHForest()\n>>> >>> lshf.fit(X_train)  # doctest: +NORMALIZE_WHITESPACE\n>>> LSHForest(min_hash_match=4, n_candidates=50, n_estimators=10,\n>>>           n_neighbors=5, radius=1.0, radius_cutoff_ratio=0.9,\n>>>           random_state=None)\n>>> >>> distances, indices = lshf.kneighbors(X_test, n_neighbors=2)\n>>> >>> distances                                        # doctest: +ELLIPSIS\n>>> array([[ 0.069...,  0.149...],\n>>>        [ 0.229...,  0.481...],\n>>>        [ 0.004...,  0.014...]])\n>>> >>> indices\n>>> array([[1, 2],\n>>>        [2, 0],\n>>>        [4, 0]])\n>>>\n>>> —\n>>> Reply to this email directly or view it on GitHub\n>>> <https://github.com/scikit-learn/scikit-learn/pull/5402/files#r42167212>\n>>> .\n>>>\n>>\n>>\n>\n","created_at":"2015-10-15T20:48:28Z","updated_at":"2015-10-15T20:48:28Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/5402#discussion_r42178232","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5402","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/42178232"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/5402#discussion_r42178232"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5402"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5402","id":47755278,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/5402","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/5402.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/5402.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5402","number":5402,"state":"closed","locked":false,"title":"[MRG] fix non deterministic LSHForest doctest failure","user":{"login":"lesteve","id":1680079,"avatar_url":"https://avatars.githubusercontent.com/u/1680079?v=3","gravatar_id":"","url":"https://api.github.com/users/lesteve","html_url":"https://github.com/lesteve","followers_url":"https://api.github.com/users/lesteve/followers","following_url":"https://api.github.com/users/lesteve/following{/other_user}","gists_url":"https://api.github.com/users/lesteve/gists{/gist_id}","starred_url":"https://api.github.com/users/lesteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesteve/subscriptions","organizations_url":"https://api.github.com/users/lesteve/orgs","repos_url":"https://api.github.com/users/lesteve/repos","events_url":"https://api.github.com/users/lesteve/events{/privacy}","received_events_url":"https://api.github.com/users/lesteve/received_events","type":"User","site_admin":false},"body":"Fix #5324.","created_at":"2015-10-15T08:07:02Z","updated_at":"2015-10-15T20:48:28Z","closed_at":"2015-10-15T20:47:14Z","merged_at":"2015-10-15T20:47:14Z","merge_commit_sha":"ee1da2e3e64dfc31805f714a1c16eba060677d6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5402/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5402/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/5402/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/daf41d02c75282127c909b32bb5f1951854184dc","head":{"label":"lesteve:fix-lshforest-doctest","ref":"fix-lshforest-doctest","sha":"daf41d02c75282127c909b32bb5f1951854184dc","user":{"login":"lesteve","id":1680079,"avatar_url":"https://avatars.githubusercontent.com/u/1680079?v=3","gravatar_id":"","url":"https://api.github.com/users/lesteve","html_url":"https://github.com/lesteve","followers_url":"https://api.github.com/users/lesteve/followers","following_url":"https://api.github.com/users/lesteve/following{/other_user}","gists_url":"https://api.github.com/users/lesteve/gists{/gist_id}","starred_url":"https://api.github.com/users/lesteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesteve/subscriptions","organizations_url":"https://api.github.com/users/lesteve/orgs","repos_url":"https://api.github.com/users/lesteve/repos","events_url":"https://api.github.com/users/lesteve/events{/privacy}","received_events_url":"https://api.github.com/users/lesteve/received_events","type":"User","site_admin":false},"repo":{"id":7576906,"name":"scikit-learn","full_name":"lesteve/scikit-learn","owner":{"login":"lesteve","id":1680079,"avatar_url":"https://avatars.githubusercontent.com/u/1680079?v=3","gravatar_id":"","url":"https://api.github.com/users/lesteve","html_url":"https://github.com/lesteve","followers_url":"https://api.github.com/users/lesteve/followers","following_url":"https://api.github.com/users/lesteve/following{/other_user}","gists_url":"https://api.github.com/users/lesteve/gists{/gist_id}","starred_url":"https://api.github.com/users/lesteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesteve/subscriptions","organizations_url":"https://api.github.com/users/lesteve/orgs","repos_url":"https://api.github.com/users/lesteve/repos","events_url":"https://api.github.com/users/lesteve/events{/privacy}","received_events_url":"https://api.github.com/users/lesteve/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lesteve/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/lesteve/scikit-learn","forks_url":"https://api.github.com/repos/lesteve/scikit-learn/forks","keys_url":"https://api.github.com/repos/lesteve/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lesteve/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lesteve/scikit-learn/teams","hooks_url":"https://api.github.com/repos/lesteve/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/lesteve/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/lesteve/scikit-learn/events","assignees_url":"https://api.github.com/repos/lesteve/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/lesteve/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/lesteve/scikit-learn/tags","blobs_url":"https://api.github.com/repos/lesteve/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lesteve/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lesteve/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/lesteve/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lesteve/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/lesteve/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/lesteve/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/lesteve/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/lesteve/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/lesteve/scikit-learn/subscription","commits_url":"https://api.github.com/repos/lesteve/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/lesteve/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/lesteve/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/lesteve/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/lesteve/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/lesteve/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lesteve/scikit-learn/merges","archive_url":"https://api.github.com/repos/lesteve/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lesteve/scikit-learn/downloads","issues_url":"https://api.github.com/repos/lesteve/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/lesteve/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/lesteve/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/lesteve/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lesteve/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/lesteve/scikit-learn/releases{/id}","created_at":"2013-01-12T15:36:00Z","updated_at":"2013-01-14T02:17:00Z","pushed_at":"2015-10-15T19:40:48Z","git_url":"git://github.com/lesteve/scikit-learn.git","ssh_url":"git@github.com:lesteve/scikit-learn.git","clone_url":"https://github.com/lesteve/scikit-learn.git","svn_url":"https://github.com/lesteve/scikit-learn","homepage":"http://scikit-learn.org","size":67572,"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":"85223b9bccc283b4dfc338bd36f6049328a6c798","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":"2015-10-15T18:41:46Z","pushed_at":"2015-10-15T20:47:14Z","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":135820,"stargazers_count":7872,"watchers_count":7872,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4660,"mirror_url":null,"open_issues_count":764,"forks":4660,"open_issues":764,"watchers":7872,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5402"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/5402"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5402"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5402/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5402/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/5402/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/daf41d02c75282127c909b32bb5f1951854184dc"}}}}