{"action":"created","comment":{"url":"https://api.github.com/repos/qminer/qminer/pulls/comments/49713446","id":49713446,"diff_hunk":"@@ -856,6 +855,109 @@ class TOnlineHistogram {\n };\n \n /////////////////////////////////////////////////\n+///   TDigest\n+///   Data structure useful for percentile and quantile estimation for online data streams.\n+///   It can be added to any anomaly detector to set the number of alarms triggered as a percentage of the total samples.\n+///   This is the Data Lib Sketch Implementation: https://github.com/vega/datalib-sketch/blob/master/src/t-digest.js\n+///    Paper: Ted Dunning, Otmar Ertl - https://github.com/tdunning/t-digest/blob/master/docs/t-digest-paper/histo.pdf\n+class TTDigest {\n+private:\n+\tTInt Nc;\n+\tTInt Size;\n+\tTInt Last;\n+\tTFlt TotalSum;\n+\tTFltV Weight;\n+\tTFltV Mean;\n+\tTFlt Min;\n+\tTFlt Max;\n+\t// double buffer to simplify merge operations\n+\t// MergeWeight also used for transient storage of cumulative weights\n+\tTFltV MergeWeight;\n+\tTFltV MergeMean;\n+\t// temporary buffers for recently added values\n+\tTInt Tempsize;\n+\tTFlt UnmergedSum;\n+\tTInt TempLast;\n+\tTFltV TempWeight;\n+\tTFltV TempMean;\n+\tTFlt EPSILON;","path":"src/glib/mine/signalproc.h","position":37,"original_position":37,"commit_id":"45af4db80396c49697cf6e8ad20c9d0a18f6bfeb","original_commit_id":"45af4db80396c49697cf6e8ad20c9d0a18f6bfeb","user":{"login":"rupnikj","id":900388,"avatar_url":"https://avatars.githubusercontent.com/u/900388?v=3","gravatar_id":"","url":"https://api.github.com/users/rupnikj","html_url":"https://github.com/rupnikj","followers_url":"https://api.github.com/users/rupnikj/followers","following_url":"https://api.github.com/users/rupnikj/following{/other_user}","gists_url":"https://api.github.com/users/rupnikj/gists{/gist_id}","starred_url":"https://api.github.com/users/rupnikj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rupnikj/subscriptions","organizations_url":"https://api.github.com/users/rupnikj/orgs","repos_url":"https://api.github.com/users/rupnikj/repos","events_url":"https://api.github.com/users/rupnikj/events{/privacy}","received_events_url":"https://api.github.com/users/rupnikj/received_events","type":"User","site_admin":false},"body":"I don't think this guy is defined anywhere. Also, we don't need the DEFAULT_CENTROIDS - why not use default arguments in Init functions ?","created_at":"2016-01-14T11:08:44Z","updated_at":"2016-01-14T11:08:44Z","html_url":"https://github.com/qminer/qminer/pull/333#discussion_r49713446","pull_request_url":"https://api.github.com/repos/qminer/qminer/pulls/333","_links":{"self":{"href":"https://api.github.com/repos/qminer/qminer/pulls/comments/49713446"},"html":{"href":"https://github.com/qminer/qminer/pull/333#discussion_r49713446"},"pull_request":{"href":"https://api.github.com/repos/qminer/qminer/pulls/333"}}},"pull_request":{"url":"https://api.github.com/repos/qminer/qminer/pulls/333","id":52256780,"html_url":"https://github.com/qminer/qminer/pull/333","diff_url":"https://github.com/qminer/qminer/pull/333.diff","patch_url":"https://github.com/qminer/qminer/pull/333.patch","issue_url":"https://api.github.com/repos/qminer/qminer/issues/333","number":333,"state":"open","locked":false,"title":"TDigest","user":{"login":"mkarlovc","id":808516,"avatar_url":"https://avatars.githubusercontent.com/u/808516?v=3","gravatar_id":"","url":"https://api.github.com/users/mkarlovc","html_url":"https://github.com/mkarlovc","followers_url":"https://api.github.com/users/mkarlovc/followers","following_url":"https://api.github.com/users/mkarlovc/following{/other_user}","gists_url":"https://api.github.com/users/mkarlovc/gists{/gist_id}","starred_url":"https://api.github.com/users/mkarlovc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkarlovc/subscriptions","organizations_url":"https://api.github.com/users/mkarlovc/orgs","repos_url":"https://api.github.com/users/mkarlovc/repos","events_url":"https://api.github.com/users/mkarlovc/events{/privacy}","received_events_url":"https://api.github.com/users/mkarlovc/received_events","type":"User","site_admin":false},"body":"- added tdigest aggregator for estimating any percentile from streaming data\r\n- added AVL tree - self-balancing binary search tree data structur","created_at":"2015-12-01T13:21:26Z","updated_at":"2016-01-14T11:08:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"031b09ca3534491df5381a47b8947b505c89c25a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/qminer/qminer/pulls/333/commits","review_comments_url":"https://api.github.com/repos/qminer/qminer/pulls/333/comments","review_comment_url":"https://api.github.com/repos/qminer/qminer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qminer/qminer/issues/333/comments","statuses_url":"https://api.github.com/repos/qminer/qminer/statuses/45af4db80396c49697cf6e8ad20c9d0a18f6bfeb","head":{"label":"mkarlovc:stab","ref":"stab","sha":"45af4db80396c49697cf6e8ad20c9d0a18f6bfeb","user":{"login":"mkarlovc","id":808516,"avatar_url":"https://avatars.githubusercontent.com/u/808516?v=3","gravatar_id":"","url":"https://api.github.com/users/mkarlovc","html_url":"https://github.com/mkarlovc","followers_url":"https://api.github.com/users/mkarlovc/followers","following_url":"https://api.github.com/users/mkarlovc/following{/other_user}","gists_url":"https://api.github.com/users/mkarlovc/gists{/gist_id}","starred_url":"https://api.github.com/users/mkarlovc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkarlovc/subscriptions","organizations_url":"https://api.github.com/users/mkarlovc/orgs","repos_url":"https://api.github.com/users/mkarlovc/repos","events_url":"https://api.github.com/users/mkarlovc/events{/privacy}","received_events_url":"https://api.github.com/users/mkarlovc/received_events","type":"User","site_admin":false},"repo":{"id":23110651,"name":"qminer","full_name":"mkarlovc/qminer","owner":{"login":"mkarlovc","id":808516,"avatar_url":"https://avatars.githubusercontent.com/u/808516?v=3","gravatar_id":"","url":"https://api.github.com/users/mkarlovc","html_url":"https://github.com/mkarlovc","followers_url":"https://api.github.com/users/mkarlovc/followers","following_url":"https://api.github.com/users/mkarlovc/following{/other_user}","gists_url":"https://api.github.com/users/mkarlovc/gists{/gist_id}","starred_url":"https://api.github.com/users/mkarlovc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkarlovc/subscriptions","organizations_url":"https://api.github.com/users/mkarlovc/orgs","repos_url":"https://api.github.com/users/mkarlovc/repos","events_url":"https://api.github.com/users/mkarlovc/events{/privacy}","received_events_url":"https://api.github.com/users/mkarlovc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mkarlovc/qminer","description":"Analytic platform for real-time large-scale streams containing structured and unstructured data.","fork":true,"url":"https://api.github.com/repos/mkarlovc/qminer","forks_url":"https://api.github.com/repos/mkarlovc/qminer/forks","keys_url":"https://api.github.com/repos/mkarlovc/qminer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mkarlovc/qminer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mkarlovc/qminer/teams","hooks_url":"https://api.github.com/repos/mkarlovc/qminer/hooks","issue_events_url":"https://api.github.com/repos/mkarlovc/qminer/issues/events{/number}","events_url":"https://api.github.com/repos/mkarlovc/qminer/events","assignees_url":"https://api.github.com/repos/mkarlovc/qminer/assignees{/user}","branches_url":"https://api.github.com/repos/mkarlovc/qminer/branches{/branch}","tags_url":"https://api.github.com/repos/mkarlovc/qminer/tags","blobs_url":"https://api.github.com/repos/mkarlovc/qminer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mkarlovc/qminer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mkarlovc/qminer/git/refs{/sha}","trees_url":"https://api.github.com/repos/mkarlovc/qminer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mkarlovc/qminer/statuses/{sha}","languages_url":"https://api.github.com/repos/mkarlovc/qminer/languages","stargazers_url":"https://api.github.com/repos/mkarlovc/qminer/stargazers","contributors_url":"https://api.github.com/repos/mkarlovc/qminer/contributors","subscribers_url":"https://api.github.com/repos/mkarlovc/qminer/subscribers","subscription_url":"https://api.github.com/repos/mkarlovc/qminer/subscription","commits_url":"https://api.github.com/repos/mkarlovc/qminer/commits{/sha}","git_commits_url":"https://api.github.com/repos/mkarlovc/qminer/git/commits{/sha}","comments_url":"https://api.github.com/repos/mkarlovc/qminer/comments{/number}","issue_comment_url":"https://api.github.com/repos/mkarlovc/qminer/issues/comments{/number}","contents_url":"https://api.github.com/repos/mkarlovc/qminer/contents/{+path}","compare_url":"https://api.github.com/repos/mkarlovc/qminer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mkarlovc/qminer/merges","archive_url":"https://api.github.com/repos/mkarlovc/qminer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mkarlovc/qminer/downloads","issues_url":"https://api.github.com/repos/mkarlovc/qminer/issues{/number}","pulls_url":"https://api.github.com/repos/mkarlovc/qminer/pulls{/number}","milestones_url":"https://api.github.com/repos/mkarlovc/qminer/milestones{/number}","notifications_url":"https://api.github.com/repos/mkarlovc/qminer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mkarlovc/qminer/labels{/name}","releases_url":"https://api.github.com/repos/mkarlovc/qminer/releases{/id}","created_at":"2014-08-19T13:13:31Z","updated_at":"2016-01-13T01:21:52Z","pushed_at":"2016-01-14T10:04:03Z","git_url":"git://github.com/mkarlovc/qminer.git","ssh_url":"git@github.com:mkarlovc/qminer.git","clone_url":"https://github.com/mkarlovc/qminer.git","svn_url":"https://github.com/mkarlovc/qminer","homepage":"http://qminer.ijs.si/","size":30989,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"qminer:master","ref":"master","sha":"b1ba14faf295eaa927b0ff9bdf31e0997861a158","user":{"login":"qminer","id":6430148,"avatar_url":"https://avatars.githubusercontent.com/u/6430148?v=3","gravatar_id":"","url":"https://api.github.com/users/qminer","html_url":"https://github.com/qminer","followers_url":"https://api.github.com/users/qminer/followers","following_url":"https://api.github.com/users/qminer/following{/other_user}","gists_url":"https://api.github.com/users/qminer/gists{/gist_id}","starred_url":"https://api.github.com/users/qminer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qminer/subscriptions","organizations_url":"https://api.github.com/users/qminer/orgs","repos_url":"https://api.github.com/users/qminer/repos","events_url":"https://api.github.com/users/qminer/events{/privacy}","received_events_url":"https://api.github.com/users/qminer/received_events","type":"Organization","site_admin":false},"repo":{"id":16001682,"name":"qminer","full_name":"qminer/qminer","owner":{"login":"qminer","id":6430148,"avatar_url":"https://avatars.githubusercontent.com/u/6430148?v=3","gravatar_id":"","url":"https://api.github.com/users/qminer","html_url":"https://github.com/qminer","followers_url":"https://api.github.com/users/qminer/followers","following_url":"https://api.github.com/users/qminer/following{/other_user}","gists_url":"https://api.github.com/users/qminer/gists{/gist_id}","starred_url":"https://api.github.com/users/qminer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qminer/subscriptions","organizations_url":"https://api.github.com/users/qminer/orgs","repos_url":"https://api.github.com/users/qminer/repos","events_url":"https://api.github.com/users/qminer/events{/privacy}","received_events_url":"https://api.github.com/users/qminer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qminer/qminer","description":"Analytic platform for real-time large-scale streams containing structured and unstructured data.","fork":false,"url":"https://api.github.com/repos/qminer/qminer","forks_url":"https://api.github.com/repos/qminer/qminer/forks","keys_url":"https://api.github.com/repos/qminer/qminer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qminer/qminer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qminer/qminer/teams","hooks_url":"https://api.github.com/repos/qminer/qminer/hooks","issue_events_url":"https://api.github.com/repos/qminer/qminer/issues/events{/number}","events_url":"https://api.github.com/repos/qminer/qminer/events","assignees_url":"https://api.github.com/repos/qminer/qminer/assignees{/user}","branches_url":"https://api.github.com/repos/qminer/qminer/branches{/branch}","tags_url":"https://api.github.com/repos/qminer/qminer/tags","blobs_url":"https://api.github.com/repos/qminer/qminer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qminer/qminer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qminer/qminer/git/refs{/sha}","trees_url":"https://api.github.com/repos/qminer/qminer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qminer/qminer/statuses/{sha}","languages_url":"https://api.github.com/repos/qminer/qminer/languages","stargazers_url":"https://api.github.com/repos/qminer/qminer/stargazers","contributors_url":"https://api.github.com/repos/qminer/qminer/contributors","subscribers_url":"https://api.github.com/repos/qminer/qminer/subscribers","subscription_url":"https://api.github.com/repos/qminer/qminer/subscription","commits_url":"https://api.github.com/repos/qminer/qminer/commits{/sha}","git_commits_url":"https://api.github.com/repos/qminer/qminer/git/commits{/sha}","comments_url":"https://api.github.com/repos/qminer/qminer/comments{/number}","issue_comment_url":"https://api.github.com/repos/qminer/qminer/issues/comments{/number}","contents_url":"https://api.github.com/repos/qminer/qminer/contents/{+path}","compare_url":"https://api.github.com/repos/qminer/qminer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qminer/qminer/merges","archive_url":"https://api.github.com/repos/qminer/qminer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qminer/qminer/downloads","issues_url":"https://api.github.com/repos/qminer/qminer/issues{/number}","pulls_url":"https://api.github.com/repos/qminer/qminer/pulls{/number}","milestones_url":"https://api.github.com/repos/qminer/qminer/milestones{/number}","notifications_url":"https://api.github.com/repos/qminer/qminer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qminer/qminer/labels{/name}","releases_url":"https://api.github.com/repos/qminer/qminer/releases{/id}","created_at":"2014-01-17T14:26:52Z","updated_at":"2016-01-11T16:16:10Z","pushed_at":"2016-01-14T10:04:04Z","git_url":"git://github.com/qminer/qminer.git","ssh_url":"git@github.com:qminer/qminer.git","clone_url":"https://github.com/qminer/qminer.git","svn_url":"https://github.com/qminer/qminer","homepage":"http://qminer.ijs.si/","size":32615,"stargazers_count":80,"watchers_count":80,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":17,"forks":34,"open_issues":17,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qminer/qminer/pulls/333"},"html":{"href":"https://github.com/qminer/qminer/pull/333"},"issue":{"href":"https://api.github.com/repos/qminer/qminer/issues/333"},"comments":{"href":"https://api.github.com/repos/qminer/qminer/issues/333/comments"},"review_comments":{"href":"https://api.github.com/repos/qminer/qminer/pulls/333/comments"},"review_comment":{"href":"https://api.github.com/repos/qminer/qminer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qminer/qminer/pulls/333/commits"},"statuses":{"href":"https://api.github.com/repos/qminer/qminer/statuses/45af4db80396c49697cf6e8ad20c9d0a18f6bfeb"}}}}