{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/30777928","id":30777928,"diff_hunk":"@@ -145,6 +145,16 @@ full formula is::\n \n     X_scaled = X_std / (max - min) + min\n \n+\n+Scaling data with outliers\n+--------------------------\n+If your data contains many outliers, scaling using the mean and variance\n+of the data does sometimes not work very well. In these cases, you can use\n+:func:`robust_scale` and :class:`RobustScaler` as drop-in replacements\n+instead, which use more robust estimates for the center and range of your\n+data.","path":"doc/modules/preprocessing.rst","position":11,"original_position":11,"commit_id":"20c622f81973c9a8393024d7ec264fe71e587d1f","original_commit_id":"20c622f81973c9a8393024d7ec264fe71e587d1f","user":{"login":"agramfort","id":161052,"avatar_url":"https://avatars.githubusercontent.com/u/161052?v=3","gravatar_id":"","url":"https://api.github.com/users/agramfort","html_url":"https://github.com/agramfort","followers_url":"https://api.github.com/users/agramfort/followers","following_url":"https://api.github.com/users/agramfort/following{/other_user}","gists_url":"https://api.github.com/users/agramfort/gists{/gist_id}","starred_url":"https://api.github.com/users/agramfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agramfort/subscriptions","organizations_url":"https://api.github.com/users/agramfort/orgs","repos_url":"https://api.github.com/users/agramfort/repos","events_url":"https://api.github.com/users/agramfort/events{/privacy}","received_events_url":"https://api.github.com/users/agramfort/received_events","type":"User","site_admin":false},"body":"as drop-in replacements instead, which use more robust estimates for the center and range of your data. ...\r\n\r\n->\r\n\r\n. It uses robust estimates for the center and range of your data.","created_at":"2015-05-21T07:21:24Z","updated_at":"2015-05-21T07:21:24Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4125#discussion_r30777928","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4125","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/30777928"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4125#discussion_r30777928"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4125"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4125","id":27633282,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/4125","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4125.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4125.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4125","number":4125,"state":"open","locked":false,"title":"[MRG + 1] ENH RobustScaler","user":{"login":"untom","id":3627551,"avatar_url":"https://avatars.githubusercontent.com/u/3627551?v=3","gravatar_id":"","url":"https://api.github.com/users/untom","html_url":"https://github.com/untom","followers_url":"https://api.github.com/users/untom/followers","following_url":"https://api.github.com/users/untom/following{/other_user}","gists_url":"https://api.github.com/users/untom/gists{/gist_id}","starred_url":"https://api.github.com/users/untom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/untom/subscriptions","organizations_url":"https://api.github.com/users/untom/orgs","repos_url":"https://api.github.com/users/untom/repos","events_url":"https://api.github.com/users/untom/events{/privacy}","received_events_url":"https://api.github.com/users/untom/received_events","type":"User","site_admin":false},"body":"This PR adds `RobustScaler` and `robust_scale` as alternative to `StandardScaler` and `scale`. They use robust estimates of data center/scale (median & interquartile range), which will work better for data with outliers.\r\n\r\nMost of this was discussed before in #2514 (and even older commits). I separated this out so it can be merged as-is.\r\n\r\nI originally wanted to submit this only after #3639 was merged, but sending the PR now allows it to be discussed concurrently (if either this or #3639 get merged, I'll of course update the other commit).\r\n\r\n","created_at":"2015-01-19T20:25:01Z","updated_at":"2015-05-21T07:21:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15433db2d00e94bb61f7ce2c08f5dfc6fae09990","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4125/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4125/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/4125/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/20c622f81973c9a8393024d7ec264fe71e587d1f","head":{"label":"untom:RobustScaler","ref":"RobustScaler","sha":"20c622f81973c9a8393024d7ec264fe71e587d1f","user":{"login":"untom","id":3627551,"avatar_url":"https://avatars.githubusercontent.com/u/3627551?v=3","gravatar_id":"","url":"https://api.github.com/users/untom","html_url":"https://github.com/untom","followers_url":"https://api.github.com/users/untom/followers","following_url":"https://api.github.com/users/untom/following{/other_user}","gists_url":"https://api.github.com/users/untom/gists{/gist_id}","starred_url":"https://api.github.com/users/untom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/untom/subscriptions","organizations_url":"https://api.github.com/users/untom/orgs","repos_url":"https://api.github.com/users/untom/repos","events_url":"https://api.github.com/users/untom/events{/privacy}","received_events_url":"https://api.github.com/users/untom/received_events","type":"User","site_admin":false},"repo":{"id":12777310,"name":"scikit-learn","full_name":"untom/scikit-learn","owner":{"login":"untom","id":3627551,"avatar_url":"https://avatars.githubusercontent.com/u/3627551?v=3","gravatar_id":"","url":"https://api.github.com/users/untom","html_url":"https://github.com/untom","followers_url":"https://api.github.com/users/untom/followers","following_url":"https://api.github.com/users/untom/following{/other_user}","gists_url":"https://api.github.com/users/untom/gists{/gist_id}","starred_url":"https://api.github.com/users/untom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/untom/subscriptions","organizations_url":"https://api.github.com/users/untom/orgs","repos_url":"https://api.github.com/users/untom/repos","events_url":"https://api.github.com/users/untom/events{/privacy}","received_events_url":"https://api.github.com/users/untom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/untom/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/untom/scikit-learn","forks_url":"https://api.github.com/repos/untom/scikit-learn/forks","keys_url":"https://api.github.com/repos/untom/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/untom/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/untom/scikit-learn/teams","hooks_url":"https://api.github.com/repos/untom/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/untom/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/untom/scikit-learn/events","assignees_url":"https://api.github.com/repos/untom/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/untom/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/untom/scikit-learn/tags","blobs_url":"https://api.github.com/repos/untom/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/untom/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/untom/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/untom/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/untom/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/untom/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/untom/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/untom/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/untom/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/untom/scikit-learn/subscription","commits_url":"https://api.github.com/repos/untom/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/untom/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/untom/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/untom/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/untom/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/untom/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/untom/scikit-learn/merges","archive_url":"https://api.github.com/repos/untom/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/untom/scikit-learn/downloads","issues_url":"https://api.github.com/repos/untom/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/untom/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/untom/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/untom/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/untom/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/untom/scikit-learn/releases{/id}","created_at":"2013-09-12T07:09:51Z","updated_at":"2015-03-31T08:12:21Z","pushed_at":"2015-05-20T20:06:51Z","git_url":"git://github.com/untom/scikit-learn.git","ssh_url":"git@github.com:untom/scikit-learn.git","clone_url":"https://github.com/untom/scikit-learn.git","svn_url":"https://github.com/untom/scikit-learn","homepage":"http://scikit-learn.org","size":61159,"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":"4121c3007feb14284d172397ad8b5c72481a8e52","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-05-21T06:33:10Z","pushed_at":"2015-05-21T07:07: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":126816,"stargazers_count":6062,"watchers_count":6062,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3635,"mirror_url":null,"open_issues_count":663,"forks":3635,"open_issues":663,"watchers":6062,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4125"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4125"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4125"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4125/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4125/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/4125/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/20c622f81973c9a8393024d7ec264fe71e587d1f"}}}}