{"action":"created","issue":{"url":"https://api.github.com/repos/vks/average/issues/10","repository_url":"https://api.github.com/repos/vks/average","labels_url":"https://api.github.com/repos/vks/average/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/vks/average/issues/10/comments","events_url":"https://api.github.com/repos/vks/average/issues/10/events","html_url":"https://github.com/vks/average/issues/10","id":301077860,"number":10,"title":"Quantile calculation is wrong for most inputs","user":{"login":"robsmith11","id":22622548,"avatar_url":"https://avatars2.githubusercontent.com/u/22622548?v=4","gravatar_id":"","url":"https://api.github.com/users/robsmith11","html_url":"https://github.com/robsmith11","followers_url":"https://api.github.com/users/robsmith11/followers","following_url":"https://api.github.com/users/robsmith11/following{/other_user}","gists_url":"https://api.github.com/users/robsmith11/gists{/gist_id}","starred_url":"https://api.github.com/users/robsmith11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robsmith11/subscriptions","organizations_url":"https://api.github.com/users/robsmith11/orgs","repos_url":"https://api.github.com/users/robsmith11/repos","events_url":"https://api.github.com/users/robsmith11/events{/privacy}","received_events_url":"https://api.github.com/users/robsmith11/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-28T15:53:32Z","updated_at":"2018-02-28T17:09:08Z","closed_at":null,"author_association":"NONE","body":"I'm not sure what's going on in the quantile calculation, but it's producing results that aren't even close to being correct for most inputs.\r\n\r\nFor example, it calculates the 99th percentile (`p=0.99`) of\r\n```\r\n(0..10).into_iter().map(|x| x as f64)\r\n```\r\nas `6.0`.\r\n\r\nThe test case in the code happens to work, but almost all of the results on my data are wrong."},"comment":{"url":"https://api.github.com/repos/vks/average/issues/comments/369309987","html_url":"https://github.com/vks/average/issues/10#issuecomment-369309987","issue_url":"https://api.github.com/repos/vks/average/issues/10","id":369309987,"user":{"login":"vks","id":33460,"avatar_url":"https://avatars2.githubusercontent.com/u/33460?v=4","gravatar_id":"","url":"https://api.github.com/users/vks","html_url":"https://github.com/vks","followers_url":"https://api.github.com/users/vks/followers","following_url":"https://api.github.com/users/vks/following{/other_user}","gists_url":"https://api.github.com/users/vks/gists{/gist_id}","starred_url":"https://api.github.com/users/vks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vks/subscriptions","organizations_url":"https://api.github.com/users/vks/orgs","repos_url":"https://api.github.com/users/vks/repos","events_url":"https://api.github.com/users/vks/events{/privacy}","received_events_url":"https://api.github.com/users/vks/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T17:09:08Z","updated_at":"2018-02-28T17:09:08Z","author_association":"OWNER","body":"See the [`quantiles`](https://crates.io/crates/quantiles) crate for algorithms trading space for better control of the error.\r\n\r\nI will update the documentation to be clearer about the trade-offs."}}
{"actor":{"display_login":"vks"}}