{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/27781217","id":27781217,"diff_hunk":"@@ -427,6 +482,29 @@ and the ``'effective_metric_'`` is in the ``'VALID_METRICS'`` list of\n same order as the number of training points, and that ``leaf_size`` is \n close to its default value of ``30``.\n \n+Valid Metrics for Nearest Neighbor Algorithms\n+---------------------------------------------\n+\n+========================     =================================================================\n+Algorithm                    Valid Metrics\n+========================     =================================================================\n+**Brute Force**              'euclidean', 'l2', 'l1', 'manhattan', 'cityblock',\n+                             'braycurtis', 'canberra', 'chebyshev', 'correlation',\n+                             'cosine', 'dice', 'hamming', 'jaccard', 'kulsinski',\n+                             'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto',\n+                             'russellrao', 'seuclidean', 'sokalmichener',\n+                             'sokalsneath', 'sqeuclidean', 'yule', 'wminkowski'\n+\n+**K-D Tree**                 'chebyshev', 'euclidean', 'cityblock', 'manhattan', 'infinity',\n+                             'minkowski', 'p', 'l2', 'l1'\n+\n+**Ball Tree**                'chebyshev', 'sokalmichener', 'canberra', 'haversine',\n+                             'rogerstanimoto', 'matching', 'dice', 'euclidean', 'braycurtis',\n+                             'russellrao', 'cityblock', 'manhattan', 'infinity', 'jaccard',\n+                             'seuclidean', 'sokalsneath', 'kulsinski', 'minkowski',\n+                             'mahalanobis', 'p', 'l2', 'hamming', 'l1', 'wminkowski', 'pyfunc'\n+========================     =================================================================\n+","path":"doc/modules/neighbors.rst","position":88,"original_position":88,"commit_id":"3926ed222094db5dd1bebd98f9901262f45b4701","original_commit_id":"3926ed222094db5dd1bebd98f9901262f45b4701","user":{"login":"vortex-ape","id":4329421,"avatar_url":"https://avatars.githubusercontent.com/u/4329421?v=3","gravatar_id":"","url":"https://api.github.com/users/vortex-ape","html_url":"https://github.com/vortex-ape","followers_url":"https://api.github.com/users/vortex-ape/followers","following_url":"https://api.github.com/users/vortex-ape/following{/other_user}","gists_url":"https://api.github.com/users/vortex-ape/gists{/gist_id}","starred_url":"https://api.github.com/users/vortex-ape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vortex-ape/subscriptions","organizations_url":"https://api.github.com/users/vortex-ape/orgs","repos_url":"https://api.github.com/users/vortex-ape/repos","events_url":"https://api.github.com/users/vortex-ape/events{/privacy}","received_events_url":"https://api.github.com/users/vortex-ape/received_events","type":"User","site_admin":false},"body":"You mean like it has been done in the Usage examples under that table in model_selection? So I should do something like this here?\r\n\r\n<pre>\r\n>>> from sklearn.neighbors import KDTree\r\n>>> print(KDTree.valid_metrics)\r\n</pre>\r\n\r\nSorry for being noob.","created_at":"2015-04-05T22:57:00Z","updated_at":"2015-04-05T22:57:00Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4525#discussion_r27781217","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4525","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/27781217"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4525#discussion_r27781217"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4525"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4525","id":32654796,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/4525","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4525.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4525.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4525","number":4525,"state":"open","locked":false,"title":"Listed valid metrics for neighbors algorithms","user":{"login":"vortex-ape","id":4329421,"avatar_url":"https://avatars.githubusercontent.com/u/4329421?v=3","gravatar_id":"","url":"https://api.github.com/users/vortex-ape","html_url":"https://github.com/vortex-ape","followers_url":"https://api.github.com/users/vortex-ape/followers","following_url":"https://api.github.com/users/vortex-ape/following{/other_user}","gists_url":"https://api.github.com/users/vortex-ape/gists{/gist_id}","starred_url":"https://api.github.com/users/vortex-ape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vortex-ape/subscriptions","organizations_url":"https://api.github.com/users/vortex-ape/orgs","repos_url":"https://api.github.com/users/vortex-ape/repos","events_url":"https://api.github.com/users/vortex-ape/events{/privacy}","received_events_url":"https://api.github.com/users/vortex-ape/received_events","type":"User","site_admin":false},"body":"#4521 ","created_at":"2015-04-05T21:34:59Z","updated_at":"2015-04-05T22:57:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de281d492a8508545a7a348da4a018ea50be7f87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4525/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4525/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/4525/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/3926ed222094db5dd1bebd98f9901262f45b4701","head":{"label":"vortex-ape:list_valid_metrics","ref":"list_valid_metrics","sha":"3926ed222094db5dd1bebd98f9901262f45b4701","user":{"login":"vortex-ape","id":4329421,"avatar_url":"https://avatars.githubusercontent.com/u/4329421?v=3","gravatar_id":"","url":"https://api.github.com/users/vortex-ape","html_url":"https://github.com/vortex-ape","followers_url":"https://api.github.com/users/vortex-ape/followers","following_url":"https://api.github.com/users/vortex-ape/following{/other_user}","gists_url":"https://api.github.com/users/vortex-ape/gists{/gist_id}","starred_url":"https://api.github.com/users/vortex-ape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vortex-ape/subscriptions","organizations_url":"https://api.github.com/users/vortex-ape/orgs","repos_url":"https://api.github.com/users/vortex-ape/repos","events_url":"https://api.github.com/users/vortex-ape/events{/privacy}","received_events_url":"https://api.github.com/users/vortex-ape/received_events","type":"User","site_admin":false},"repo":{"id":30604507,"name":"scikit-learn","full_name":"vortex-ape/scikit-learn","owner":{"login":"vortex-ape","id":4329421,"avatar_url":"https://avatars.githubusercontent.com/u/4329421?v=3","gravatar_id":"","url":"https://api.github.com/users/vortex-ape","html_url":"https://github.com/vortex-ape","followers_url":"https://api.github.com/users/vortex-ape/followers","following_url":"https://api.github.com/users/vortex-ape/following{/other_user}","gists_url":"https://api.github.com/users/vortex-ape/gists{/gist_id}","starred_url":"https://api.github.com/users/vortex-ape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vortex-ape/subscriptions","organizations_url":"https://api.github.com/users/vortex-ape/orgs","repos_url":"https://api.github.com/users/vortex-ape/repos","events_url":"https://api.github.com/users/vortex-ape/events{/privacy}","received_events_url":"https://api.github.com/users/vortex-ape/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vortex-ape/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/vortex-ape/scikit-learn","forks_url":"https://api.github.com/repos/vortex-ape/scikit-learn/forks","keys_url":"https://api.github.com/repos/vortex-ape/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vortex-ape/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vortex-ape/scikit-learn/teams","hooks_url":"https://api.github.com/repos/vortex-ape/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/vortex-ape/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/vortex-ape/scikit-learn/events","assignees_url":"https://api.github.com/repos/vortex-ape/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/vortex-ape/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/vortex-ape/scikit-learn/tags","blobs_url":"https://api.github.com/repos/vortex-ape/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vortex-ape/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vortex-ape/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/vortex-ape/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vortex-ape/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/vortex-ape/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/vortex-ape/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/vortex-ape/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/vortex-ape/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/vortex-ape/scikit-learn/subscription","commits_url":"https://api.github.com/repos/vortex-ape/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/vortex-ape/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/vortex-ape/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/vortex-ape/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/vortex-ape/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/vortex-ape/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vortex-ape/scikit-learn/merges","archive_url":"https://api.github.com/repos/vortex-ape/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vortex-ape/scikit-learn/downloads","issues_url":"https://api.github.com/repos/vortex-ape/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/vortex-ape/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/vortex-ape/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/vortex-ape/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vortex-ape/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/vortex-ape/scikit-learn/releases{/id}","created_at":"2015-02-10T17:30:31Z","updated_at":"2015-04-05T21:44:26Z","pushed_at":"2015-04-05T22:43:58Z","git_url":"git://github.com/vortex-ape/scikit-learn.git","ssh_url":"git@github.com:vortex-ape/scikit-learn.git","clone_url":"https://github.com/vortex-ape/scikit-learn.git","svn_url":"https://github.com/vortex-ape/scikit-learn","homepage":"http://scikit-learn.org","size":60772,"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":"scikit-learn:master","ref":"master","sha":"9206a785c9d9bdbeb7a6d155b4d7d80886e636a6","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-04-05T22:47:21Z","pushed_at":"2015-04-05T22:44:45Z","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":120313,"stargazers_count":5482,"watchers_count":5482,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3271,"mirror_url":null,"open_issues_count":609,"forks":3271,"open_issues":609,"watchers":5482,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4525"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4525"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4525"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4525/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4525/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/4525/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/3926ed222094db5dd1bebd98f9901262f45b4701"}}}}