{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5279","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5279/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5279/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5279/events","html_url":"https://github.com/scikit-learn/scikit-learn/pull/5279","id":106766050,"number":5279,"title":"WIP: LOF algorithm (Anomaly Detection)","user":{"login":"ngoix","id":5682433,"avatar_url":"https://avatars.githubusercontent.com/u/5682433?v=3","gravatar_id":"","url":"https://api.github.com/users/ngoix","html_url":"https://github.com/ngoix","followers_url":"https://api.github.com/users/ngoix/followers","following_url":"https://api.github.com/users/ngoix/following{/other_user}","gists_url":"https://api.github.com/users/ngoix/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoix/subscriptions","organizations_url":"https://api.github.com/users/ngoix/orgs","repos_url":"https://api.github.com/users/ngoix/repos","events_url":"https://api.github.com/users/ngoix/events{/privacy}","received_events_url":"https://api.github.com/users/ngoix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2015-09-16T12:44:13Z","updated_at":"2016-04-06T15:55:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5279","html_url":"https://github.com/scikit-learn/scikit-learn/pull/5279","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/5279.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/5279.patch"},"body":"Local Outlier Factor implementation.\r\n\r\nMotivated by previous discussions\r\nhttp://sourceforge.net/p/scikit-learn/mailman/message/32485020\r\nand\r\nhttps://github.com/scikit-learn/scikit-learn/pull/4163\r\n\r\nbenchmarks of LOF on:\r\nhttps://github.com/ngoix/scikit-learn/tree/bench_lof\r\n"},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/206440136","html_url":"https://github.com/scikit-learn/scikit-learn/pull/5279#issuecomment-206440136","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5279","id":206440136,"user":{"login":"ngoix","id":5682433,"avatar_url":"https://avatars.githubusercontent.com/u/5682433?v=3","gravatar_id":"","url":"https://api.github.com/users/ngoix","html_url":"https://github.com/ngoix","followers_url":"https://api.github.com/users/ngoix/followers","following_url":"https://api.github.com/users/ngoix/following{/other_user}","gists_url":"https://api.github.com/users/ngoix/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoix/subscriptions","organizations_url":"https://api.github.com/users/ngoix/orgs","repos_url":"https://api.github.com/users/ngoix/repos","events_url":"https://api.github.com/users/ngoix/events{/privacy}","received_events_url":"https://api.github.com/users/ngoix/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T15:55:59Z","updated_at":"2016-04-06T15:55:59Z","body":"@amueller I have done a benchmark of LOF vs IsolationForest on a wider range of datasets (most of them are in the benchmark you posted).\r\n----In a novelty detection framwork (no outliers in training data):\r\niforest:\r\n![iforest_roc_pr](https://cloud.githubusercontent.com/assets/5682433/14315515/1c800bf8-fbfe-11e5-9d3d-2dd97fc090dd.png)\r\nlof:\r\n![lof_roc_pr](https://cloud.githubusercontent.com/assets/5682433/14315519/2008c882-fbfe-11e5-89a8-e7007e8dbab1.png)\r\n\r\nAccording to ROC scores, LOF is better than iForest on 6 datasets over 15 (shuttle, forestcover, ionosphere, pendigits, wilt, internet_ads).\r\nAccording to PR scores, LOF is better than iForest on 7 datasets (idem + smtp dataset)\r\n\r\n----In an outlier detection framework (outliers in training data):\r\niforest:\r\n![iforest_roc_pr_unsupervised](https://cloud.githubusercontent.com/assets/5682433/14323222/f4696cb4-fc1f-11e5-8e98-02f0fad5194f.png)\r\n\r\nlof:\r\n![lof_roc_pr_unsupervised](https://cloud.githubusercontent.com/assets/5682433/14323232/faa0c456-fc1f-11e5-8164-27e07cb58f5c.png)\r\n\r\nAccording to ROC scores, LOF is better than iForest on 6 datasets over 15 (smtp, ionosphere, arrhythmia, pendigits, wilt, adult).\r\nAccording to PR scores, LOF is better than iForest on 4 datasets (idem - (arrhythmia + adult))"}}