{"action":"closed","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6902","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6902/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6902/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6902/events","html_url":"https://github.com/scikit-learn/scikit-learn/issues/6902","id":160855909,"number":6902,"title":"RadiusNeighborsClassifier: possible problem with outliers class?","user":{"login":"LeonieBorne","id":19991748,"avatar_url":"https://avatars.githubusercontent.com/u/19991748?v=3","gravatar_id":"","url":"https://api.github.com/users/LeonieBorne","html_url":"https://github.com/LeonieBorne","followers_url":"https://api.github.com/users/LeonieBorne/followers","following_url":"https://api.github.com/users/LeonieBorne/following{/other_user}","gists_url":"https://api.github.com/users/LeonieBorne/gists{/gist_id}","starred_url":"https://api.github.com/users/LeonieBorne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeonieBorne/subscriptions","organizations_url":"https://api.github.com/users/LeonieBorne/orgs","repos_url":"https://api.github.com/users/LeonieBorne/repos","events_url":"https://api.github.com/users/LeonieBorne/events{/privacy}","received_events_url":"https://api.github.com/users/LeonieBorne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels/Easy","name":"Easy","color":"02d7e1"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-17T10:13:31Z","updated_at":"2016-07-23T20:29:29Z","closed_at":"2016-07-23T20:29:28Z","body":"Hi,\r\n\r\nWhen I use the RadiusNeighborsClassifier with an outlier class, I get this message : \r\n\r\n```ruby\r\nTraceback (most recent call last):\r\n\r\n  File \"<ipython-input-238-0224ec628811>\", line 17, in <module>\r\n    scores.append(clf.score(X_test, y_test))\r\n\r\n  File \"/volatile/anaconda2/lib/python2.7/site-packages/sklearn/base.py\", line 310, in score\r\n    return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\r\n\r\n  File \"/volatile/anaconda2/lib/python2.7/site-packages/sklearn/neighbors/classification.py\", line 379, in predict\r\n    in zip(pred_labels[inliers], weights)],\r\n\r\n  File \"/volatile/anaconda2/lib/python2.7/site-packages/sklearn/utils/extmath.py\", line 404, in weighted_mode\r\n    w = np.zeros(a.shape, dtype=w.dtype) + w\r\n\r\nValueError: operands could not be broadcast together with shapes (101,) (82,) \r\n```\r\n\r\nI'm wondering if the line `in zip(pred_labels[inliers], weights)] `needs to be replaced with `in zip(pred_labels[inliers], weights[inliers])]`. \r\nI'm using the version 0.17.1 of sklearn.\r\n\r\n\r\n"}}
{"actor":{"display_login":"agramfort"}}