{"action":"closed","number":356,"pull_request":{"url":"https://api.github.com/repos/myui/hivemall/pulls/356","id":86700115,"html_url":"https://github.com/myui/hivemall/pull/356","diff_url":"https://github.com/myui/hivemall/pull/356.diff","patch_url":"https://github.com/myui/hivemall/pull/356.patch","issue_url":"https://api.github.com/repos/myui/hivemall/issues/356","number":356,"state":"closed","locked":false,"title":"Implement SST-based change-point detector","user":{"login":"takuti","id":853567,"avatar_url":"https://avatars.githubusercontent.com/u/853567?v=3","gravatar_id":"","url":"https://api.github.com/users/takuti","html_url":"https://github.com/takuti","followers_url":"https://api.github.com/users/takuti/followers","following_url":"https://api.github.com/users/takuti/following{/other_user}","gists_url":"https://api.github.com/users/takuti/gists{/gist_id}","starred_url":"https://api.github.com/users/takuti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuti/subscriptions","organizations_url":"https://api.github.com/users/takuti/orgs","repos_url":"https://api.github.com/users/takuti/repos","events_url":"https://api.github.com/users/takuti/events{/privacy}","received_events_url":"https://api.github.com/users/takuti/received_events","type":"User","site_admin":false},"body":"see #342 \n\n[Reference Python implementation](https://github.com/takuti/datadog-anomaly-detector/blob/57940ca87b3d5836f053c9349d8e3f18ede45bd9/core/sst/sst.py)\n### Sample table\n\n| time | x |\n| --: | --: |\n| 1 | 182.478 |\n| 2 | 176.231 |\n| 3 | 183.917 |\n| 4 | 177.798 |\n| 5 | 165.469 |\n| ... | ... |\n\n(14398 points from [twitter data](https://blog.twitter.com/2015/introducing-practical-and-robust-anomaly-detection-in-a-time-series))\n### Usage\n\n``` sql\ncreate temporary function sst as 'hivemall.anomaly.SingularSpectrumTransformUDF';\n```\n\n``` sql\nSELECT\n  time,\n  -- x is double or array<double>\n  -- sst(x) AS res\n  sst(x, \"-th 0.005\") AS res\nFROM\n  twitter_timeseries\nORDER BY time ASC\n;\n```\n### Results\n\n```\n7551    {\"changepoint_score\":0.00453049288071683,\"is_changepoint\":false}\n7552    {\"changepoint_score\":0.004711244102524104,\"is_changepoint\":false}\n7553    {\"changepoint_score\":0.004814871928978115,\"is_changepoint\":false}\n7554    {\"changepoint_score\":0.004968089640799422,\"is_changepoint\":false}\n7555    {\"changepoint_score\":0.005709056330104878,\"is_changepoint\":true}\n7556    {\"changepoint_score\":0.0044279766655132,\"is_changepoint\":false}\n7557    {\"changepoint_score\":0.0034694956722586268,\"is_changepoint\":false}\n7558    {\"changepoint_score\":0.002549056569322694,\"is_changepoint\":false}\n7559    {\"changepoint_score\":0.0017395109108403473,\"is_changepoint\":false}\n7560    {\"changepoint_score\":0.0010629833145070489,\"is_changepoint\":false}\n```\n\nOn the naive SVD-based implementation, elapsed time was about 20 sec. for the 14398 samples (vs. 10 sec on ChangeFinder)\n### Observations\n\nThe change-point scores are much more stable compared to ChangeFinder, and change-point scores are always in [0, 1]. However, since the scores are quite noisy, too many change-points are detected. Smoothing scores like ChangeFinder is practically important.\n\nIn terms of running time, the naive SVD-based implementation is clearly inefficient. So, the Lanczos-based efficient variant should be supported.\n","created_at":"2016-09-26T08:29:17Z","updated_at":"2016-12-02T08:19:36Z","closed_at":"2016-12-02T08:19:36Z","merged_at":null,"merge_commit_sha":"ccd8dea3cb0b80d34284646f343fb529cd92071f","assignee":{"login":"myui","id":1163783,"avatar_url":"https://avatars.githubusercontent.com/u/1163783?v=3","gravatar_id":"","url":"https://api.github.com/users/myui","html_url":"https://github.com/myui","followers_url":"https://api.github.com/users/myui/followers","following_url":"https://api.github.com/users/myui/following{/other_user}","gists_url":"https://api.github.com/users/myui/gists{/gist_id}","starred_url":"https://api.github.com/users/myui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myui/subscriptions","organizations_url":"https://api.github.com/users/myui/orgs","repos_url":"https://api.github.com/users/myui/repos","events_url":"https://api.github.com/users/myui/events{/privacy}","received_events_url":"https://api.github.com/users/myui/received_events","type":"User","site_admin":false},"assignees":[{"login":"myui","id":1163783,"avatar_url":"https://avatars.githubusercontent.com/u/1163783?v=3","gravatar_id":"","url":"https://api.github.com/users/myui","html_url":"https://github.com/myui","followers_url":"https://api.github.com/users/myui/followers","following_url":"https://api.github.com/users/myui/following{/other_user}","gists_url":"https://api.github.com/users/myui/gists{/gist_id}","starred_url":"https://api.github.com/users/myui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myui/subscriptions","organizations_url":"https://api.github.com/users/myui/orgs","repos_url":"https://api.github.com/users/myui/repos","events_url":"https://api.github.com/users/myui/events{/privacy}","received_events_url":"https://api.github.com/users/myui/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/myui/hivemall/milestones/3","html_url":"https://github.com/myui/hivemall/milestones/v0.4","labels_url":"https://api.github.com/repos/myui/hivemall/milestones/3/labels","id":450961,"number":3,"title":"v0.4","description":null,"creator":{"login":"myui","id":1163783,"avatar_url":"https://avatars.githubusercontent.com/u/1163783?v=3","gravatar_id":"","url":"https://api.github.com/users/myui","html_url":"https://github.com/myui","followers_url":"https://api.github.com/users/myui/followers","following_url":"https://api.github.com/users/myui/following{/other_user}","gists_url":"https://api.github.com/users/myui/gists{/gist_id}","starred_url":"https://api.github.com/users/myui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myui/subscriptions","organizations_url":"https://api.github.com/users/myui/orgs","repos_url":"https://api.github.com/users/myui/repos","events_url":"https://api.github.com/users/myui/events{/privacy}","received_events_url":"https://api.github.com/users/myui/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":147,"state":"open","created_at":"2013-10-09T17:13:14Z","updated_at":"2016-12-02T08:19:36Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/myui/hivemall/pulls/356/commits","review_comments_url":"https://api.github.com/repos/myui/hivemall/pulls/356/comments","review_comment_url":"https://api.github.com/repos/myui/hivemall/pulls/comments{/number}","comments_url":"https://api.github.com/repos/myui/hivemall/issues/356/comments","statuses_url":"https://api.github.com/repos/myui/hivemall/statuses/03b94bede2632eb94b2eab61bf87f0107d7aeb04","head":{"label":"takuti:sst-changepoint","ref":"sst-changepoint","sha":"03b94bede2632eb94b2eab61bf87f0107d7aeb04","user":{"login":"takuti","id":853567,"avatar_url":"https://avatars.githubusercontent.com/u/853567?v=3","gravatar_id":"","url":"https://api.github.com/users/takuti","html_url":"https://github.com/takuti","followers_url":"https://api.github.com/users/takuti/followers","following_url":"https://api.github.com/users/takuti/following{/other_user}","gists_url":"https://api.github.com/users/takuti/gists{/gist_id}","starred_url":"https://api.github.com/users/takuti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuti/subscriptions","organizations_url":"https://api.github.com/users/takuti/orgs","repos_url":"https://api.github.com/users/takuti/repos","events_url":"https://api.github.com/users/takuti/events{/privacy}","received_events_url":"https://api.github.com/users/takuti/received_events","type":"User","site_admin":false},"repo":{"id":65952405,"name":"hivemall","full_name":"takuti/hivemall","owner":{"login":"takuti","id":853567,"avatar_url":"https://avatars.githubusercontent.com/u/853567?v=3","gravatar_id":"","url":"https://api.github.com/users/takuti","html_url":"https://github.com/takuti","followers_url":"https://api.github.com/users/takuti/followers","following_url":"https://api.github.com/users/takuti/following{/other_user}","gists_url":"https://api.github.com/users/takuti/gists{/gist_id}","starred_url":"https://api.github.com/users/takuti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuti/subscriptions","organizations_url":"https://api.github.com/users/takuti/orgs","repos_url":"https://api.github.com/users/takuti/repos","events_url":"https://api.github.com/users/takuti/events{/privacy}","received_events_url":"https://api.github.com/users/takuti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/takuti/hivemall","description":"Scalable machine learning library for Hive/Hadoop","fork":true,"url":"https://api.github.com/repos/takuti/hivemall","forks_url":"https://api.github.com/repos/takuti/hivemall/forks","keys_url":"https://api.github.com/repos/takuti/hivemall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/takuti/hivemall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/takuti/hivemall/teams","hooks_url":"https://api.github.com/repos/takuti/hivemall/hooks","issue_events_url":"https://api.github.com/repos/takuti/hivemall/issues/events{/number}","events_url":"https://api.github.com/repos/takuti/hivemall/events","assignees_url":"https://api.github.com/repos/takuti/hivemall/assignees{/user}","branches_url":"https://api.github.com/repos/takuti/hivemall/branches{/branch}","tags_url":"https://api.github.com/repos/takuti/hivemall/tags","blobs_url":"https://api.github.com/repos/takuti/hivemall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/takuti/hivemall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/takuti/hivemall/git/refs{/sha}","trees_url":"https://api.github.com/repos/takuti/hivemall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/takuti/hivemall/statuses/{sha}","languages_url":"https://api.github.com/repos/takuti/hivemall/languages","stargazers_url":"https://api.github.com/repos/takuti/hivemall/stargazers","contributors_url":"https://api.github.com/repos/takuti/hivemall/contributors","subscribers_url":"https://api.github.com/repos/takuti/hivemall/subscribers","subscription_url":"https://api.github.com/repos/takuti/hivemall/subscription","commits_url":"https://api.github.com/repos/takuti/hivemall/commits{/sha}","git_commits_url":"https://api.github.com/repos/takuti/hivemall/git/commits{/sha}","comments_url":"https://api.github.com/repos/takuti/hivemall/comments{/number}","issue_comment_url":"https://api.github.com/repos/takuti/hivemall/issues/comments{/number}","contents_url":"https://api.github.com/repos/takuti/hivemall/contents/{+path}","compare_url":"https://api.github.com/repos/takuti/hivemall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/takuti/hivemall/merges","archive_url":"https://api.github.com/repos/takuti/hivemall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/takuti/hivemall/downloads","issues_url":"https://api.github.com/repos/takuti/hivemall/issues{/number}","pulls_url":"https://api.github.com/repos/takuti/hivemall/pulls{/number}","milestones_url":"https://api.github.com/repos/takuti/hivemall/milestones{/number}","notifications_url":"https://api.github.com/repos/takuti/hivemall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/takuti/hivemall/labels{/name}","releases_url":"https://api.github.com/repos/takuti/hivemall/releases{/id}","deployments_url":"https://api.github.com/repos/takuti/hivemall/deployments","created_at":"2016-08-18T00:44:55Z","updated_at":"2016-08-18T00:44:58Z","pushed_at":"2016-09-28T10:50:00Z","git_url":"git://github.com/takuti/hivemall.git","ssh_url":"git@github.com:takuti/hivemall.git","clone_url":"https://github.com/takuti/hivemall.git","svn_url":"https://github.com/takuti/hivemall","homepage":"","size":126874,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"myui:master","ref":"master","sha":"ee244c39bf06130d269d2417888cadac238f24ae","user":{"login":"myui","id":1163783,"avatar_url":"https://avatars.githubusercontent.com/u/1163783?v=3","gravatar_id":"","url":"https://api.github.com/users/myui","html_url":"https://github.com/myui","followers_url":"https://api.github.com/users/myui/followers","following_url":"https://api.github.com/users/myui/following{/other_user}","gists_url":"https://api.github.com/users/myui/gists{/gist_id}","starred_url":"https://api.github.com/users/myui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myui/subscriptions","organizations_url":"https://api.github.com/users/myui/orgs","repos_url":"https://api.github.com/users/myui/repos","events_url":"https://api.github.com/users/myui/events{/privacy}","received_events_url":"https://api.github.com/users/myui/received_events","type":"User","site_admin":false},"repo":{"id":13120591,"name":"hivemall","full_name":"myui/hivemall","owner":{"login":"myui","id":1163783,"avatar_url":"https://avatars.githubusercontent.com/u/1163783?v=3","gravatar_id":"","url":"https://api.github.com/users/myui","html_url":"https://github.com/myui","followers_url":"https://api.github.com/users/myui/followers","following_url":"https://api.github.com/users/myui/following{/other_user}","gists_url":"https://api.github.com/users/myui/gists{/gist_id}","starred_url":"https://api.github.com/users/myui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myui/subscriptions","organizations_url":"https://api.github.com/users/myui/orgs","repos_url":"https://api.github.com/users/myui/repos","events_url":"https://api.github.com/users/myui/events{/privacy}","received_events_url":"https://api.github.com/users/myui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/myui/hivemall","description":"Scalable machine learning library for Apache Hive/Spark/Pig","fork":false,"url":"https://api.github.com/repos/myui/hivemall","forks_url":"https://api.github.com/repos/myui/hivemall/forks","keys_url":"https://api.github.com/repos/myui/hivemall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/myui/hivemall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/myui/hivemall/teams","hooks_url":"https://api.github.com/repos/myui/hivemall/hooks","issue_events_url":"https://api.github.com/repos/myui/hivemall/issues/events{/number}","events_url":"https://api.github.com/repos/myui/hivemall/events","assignees_url":"https://api.github.com/repos/myui/hivemall/assignees{/user}","branches_url":"https://api.github.com/repos/myui/hivemall/branches{/branch}","tags_url":"https://api.github.com/repos/myui/hivemall/tags","blobs_url":"https://api.github.com/repos/myui/hivemall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/myui/hivemall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/myui/hivemall/git/refs{/sha}","trees_url":"https://api.github.com/repos/myui/hivemall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/myui/hivemall/statuses/{sha}","languages_url":"https://api.github.com/repos/myui/hivemall/languages","stargazers_url":"https://api.github.com/repos/myui/hivemall/stargazers","contributors_url":"https://api.github.com/repos/myui/hivemall/contributors","subscribers_url":"https://api.github.com/repos/myui/hivemall/subscribers","subscription_url":"https://api.github.com/repos/myui/hivemall/subscription","commits_url":"https://api.github.com/repos/myui/hivemall/commits{/sha}","git_commits_url":"https://api.github.com/repos/myui/hivemall/git/commits{/sha}","comments_url":"https://api.github.com/repos/myui/hivemall/comments{/number}","issue_comment_url":"https://api.github.com/repos/myui/hivemall/issues/comments{/number}","contents_url":"https://api.github.com/repos/myui/hivemall/contents/{+path}","compare_url":"https://api.github.com/repos/myui/hivemall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/myui/hivemall/merges","archive_url":"https://api.github.com/repos/myui/hivemall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/myui/hivemall/downloads","issues_url":"https://api.github.com/repos/myui/hivemall/issues{/number}","pulls_url":"https://api.github.com/repos/myui/hivemall/pulls{/number}","milestones_url":"https://api.github.com/repos/myui/hivemall/milestones{/number}","notifications_url":"https://api.github.com/repos/myui/hivemall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/myui/hivemall/labels{/name}","releases_url":"https://api.github.com/repos/myui/hivemall/releases{/id}","deployments_url":"https://api.github.com/repos/myui/hivemall/deployments","created_at":"2013-09-26T11:34:42Z","updated_at":"2016-11-25T13:03:37Z","pushed_at":"2016-12-01T11:31:26Z","git_url":"git://github.com/myui/hivemall.git","ssh_url":"git@github.com:myui/hivemall.git","clone_url":"https://github.com/myui/hivemall.git","svn_url":"https://github.com/myui/hivemall","homepage":"http://hivemall.incubator.apache.org/","size":165836,"stargazers_count":477,"watchers_count":477,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":150,"mirror_url":null,"open_issues_count":46,"forks":150,"open_issues":46,"watchers":477,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/myui/hivemall/pulls/356"},"html":{"href":"https://github.com/myui/hivemall/pull/356"},"issue":{"href":"https://api.github.com/repos/myui/hivemall/issues/356"},"comments":{"href":"https://api.github.com/repos/myui/hivemall/issues/356/comments"},"review_comments":{"href":"https://api.github.com/repos/myui/hivemall/pulls/356/comments"},"review_comment":{"href":"https://api.github.com/repos/myui/hivemall/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/myui/hivemall/pulls/356/commits"},"statuses":{"href":"https://api.github.com/repos/myui/hivemall/statuses/03b94bede2632eb94b2eab61bf87f0107d7aeb04"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":9,"review_comments":24,"commits":4,"additions":844,"deletions":0,"changed_files":5}}
{"actor":{"display_login":"myui"}}