{"action":"created","comment":{"url":"https://api.github.com/repos/mblondel/soft-dtw/pulls/comments/183370586","pull_request_review_id":114353423,"id":183370586,"diff_hunk":"@@ -33,6 +37,10 @@ def __init__(self, D, gamma=1.0):\n         self.D = self.D.astype(np.float64)\n \n         self.gamma = gamma\n+        self.sakoe_chiba_band = sakoe_chiba_band\n+\n+        if sakoe_chiba_band >= 0:\n+            assert self.D.shape[0] == self.D.shape[1]","path":"sdtw/soft_dtw.py","position":null,"original_position":27,"commit_id":"2a19dcb45ba24786dde6cbafed58c13c58174101","original_commit_id":"62483d0388ffc9ee543b77e6899a066038d0e84c","user":{"login":"TomDLT","id":11065596,"avatar_url":"https://avatars2.githubusercontent.com/u/11065596?v=4","gravatar_id":"","url":"https://api.github.com/users/TomDLT","html_url":"https://github.com/TomDLT","followers_url":"https://api.github.com/users/TomDLT/followers","following_url":"https://api.github.com/users/TomDLT/following{/other_user}","gists_url":"https://api.github.com/users/TomDLT/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDLT/subscriptions","organizations_url":"https://api.github.com/users/TomDLT/orgs","repos_url":"https://api.github.com/users/TomDLT/repos","events_url":"https://api.github.com/users/TomDLT/events{/privacy}","received_events_url":"https://api.github.com/users/TomDLT/received_events","type":"User","site_admin":false},"body":"For simplicity.\r\nI updated the code and removed the restriction.","created_at":"2018-04-23T12:07:01Z","updated_at":"2018-04-23T12:07:01Z","html_url":"https://github.com/mblondel/soft-dtw/pull/9#discussion_r183370586","pull_request_url":"https://api.github.com/repos/mblondel/soft-dtw/pulls/9","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mblondel/soft-dtw/pulls/comments/183370586"},"html":{"href":"https://github.com/mblondel/soft-dtw/pull/9#discussion_r183370586"},"pull_request":{"href":"https://api.github.com/repos/mblondel/soft-dtw/pulls/9"}},"in_reply_to_id":183287453},"pull_request":{"url":"https://api.github.com/repos/mblondel/soft-dtw/pulls/9","id":177100674,"html_url":"https://github.com/mblondel/soft-dtw/pull/9","diff_url":"https://github.com/mblondel/soft-dtw/pull/9.diff","patch_url":"https://github.com/mblondel/soft-dtw/pull/9.patch","issue_url":"https://api.github.com/repos/mblondel/soft-dtw/issues/9","number":9,"state":"open","locked":false,"title":"Add Sakoe-Chiba band constraint","user":{"login":"TomDLT","id":11065596,"avatar_url":"https://avatars2.githubusercontent.com/u/11065596?v=4","gravatar_id":"","url":"https://api.github.com/users/TomDLT","html_url":"https://github.com/TomDLT","followers_url":"https://api.github.com/users/TomDLT/followers","following_url":"https://api.github.com/users/TomDLT/following{/other_user}","gists_url":"https://api.github.com/users/TomDLT/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDLT/subscriptions","organizations_url":"https://api.github.com/users/TomDLT/orgs","repos_url":"https://api.github.com/users/TomDLT/repos","events_url":"https://api.github.com/users/TomDLT/events{/privacy}","received_events_url":"https://api.github.com/users/TomDLT/received_events","type":"User","site_admin":false},"body":"This PR adds a Sakoe-Chiba band constraint [1], which constrains the path to stay in a band around the diagonal. For now it works only on squared DTW problems.\r\n\r\n___\r\n[1] Sakoe, H., & Chiba, S. (1978). Dynamic programming algorithm optimization for spoken word recognition. IEEE transactions on acoustics, speech, and signal processing, 26(1), 43-49.\r\n","created_at":"2018-03-23T15:16:58Z","updated_at":"2018-04-23T12:07:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9aa9ea0401cc7ff5398991b2d5b8fa74c10bb09a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mblondel/soft-dtw/pulls/9/commits","review_comments_url":"https://api.github.com/repos/mblondel/soft-dtw/pulls/9/comments","review_comment_url":"https://api.github.com/repos/mblondel/soft-dtw/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mblondel/soft-dtw/issues/9/comments","statuses_url":"https://api.github.com/repos/mblondel/soft-dtw/statuses/2a19dcb45ba24786dde6cbafed58c13c58174101","head":{"label":"TomDLT:sakoe_chiba","ref":"sakoe_chiba","sha":"2a19dcb45ba24786dde6cbafed58c13c58174101","user":{"login":"TomDLT","id":11065596,"avatar_url":"https://avatars2.githubusercontent.com/u/11065596?v=4","gravatar_id":"","url":"https://api.github.com/users/TomDLT","html_url":"https://github.com/TomDLT","followers_url":"https://api.github.com/users/TomDLT/followers","following_url":"https://api.github.com/users/TomDLT/following{/other_user}","gists_url":"https://api.github.com/users/TomDLT/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDLT/subscriptions","organizations_url":"https://api.github.com/users/TomDLT/orgs","repos_url":"https://api.github.com/users/TomDLT/repos","events_url":"https://api.github.com/users/TomDLT/events{/privacy}","received_events_url":"https://api.github.com/users/TomDLT/received_events","type":"User","site_admin":false},"repo":{"id":126501243,"name":"soft-dtw","full_name":"TomDLT/soft-dtw","owner":{"login":"TomDLT","id":11065596,"avatar_url":"https://avatars2.githubusercontent.com/u/11065596?v=4","gravatar_id":"","url":"https://api.github.com/users/TomDLT","html_url":"https://github.com/TomDLT","followers_url":"https://api.github.com/users/TomDLT/followers","following_url":"https://api.github.com/users/TomDLT/following{/other_user}","gists_url":"https://api.github.com/users/TomDLT/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDLT/subscriptions","organizations_url":"https://api.github.com/users/TomDLT/orgs","repos_url":"https://api.github.com/users/TomDLT/repos","events_url":"https://api.github.com/users/TomDLT/events{/privacy}","received_events_url":"https://api.github.com/users/TomDLT/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TomDLT/soft-dtw","description":"Python implementation of soft-DTW.","fork":true,"url":"https://api.github.com/repos/TomDLT/soft-dtw","forks_url":"https://api.github.com/repos/TomDLT/soft-dtw/forks","keys_url":"https://api.github.com/repos/TomDLT/soft-dtw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TomDLT/soft-dtw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TomDLT/soft-dtw/teams","hooks_url":"https://api.github.com/repos/TomDLT/soft-dtw/hooks","issue_events_url":"https://api.github.com/repos/TomDLT/soft-dtw/issues/events{/number}","events_url":"https://api.github.com/repos/TomDLT/soft-dtw/events","assignees_url":"https://api.github.com/repos/TomDLT/soft-dtw/assignees{/user}","branches_url":"https://api.github.com/repos/TomDLT/soft-dtw/branches{/branch}","tags_url":"https://api.github.com/repos/TomDLT/soft-dtw/tags","blobs_url":"https://api.github.com/repos/TomDLT/soft-dtw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TomDLT/soft-dtw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TomDLT/soft-dtw/git/refs{/sha}","trees_url":"https://api.github.com/repos/TomDLT/soft-dtw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TomDLT/soft-dtw/statuses/{sha}","languages_url":"https://api.github.com/repos/TomDLT/soft-dtw/languages","stargazers_url":"https://api.github.com/repos/TomDLT/soft-dtw/stargazers","contributors_url":"https://api.github.com/repos/TomDLT/soft-dtw/contributors","subscribers_url":"https://api.github.com/repos/TomDLT/soft-dtw/subscribers","subscription_url":"https://api.github.com/repos/TomDLT/soft-dtw/subscription","commits_url":"https://api.github.com/repos/TomDLT/soft-dtw/commits{/sha}","git_commits_url":"https://api.github.com/repos/TomDLT/soft-dtw/git/commits{/sha}","comments_url":"https://api.github.com/repos/TomDLT/soft-dtw/comments{/number}","issue_comment_url":"https://api.github.com/repos/TomDLT/soft-dtw/issues/comments{/number}","contents_url":"https://api.github.com/repos/TomDLT/soft-dtw/contents/{+path}","compare_url":"https://api.github.com/repos/TomDLT/soft-dtw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TomDLT/soft-dtw/merges","archive_url":"https://api.github.com/repos/TomDLT/soft-dtw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TomDLT/soft-dtw/downloads","issues_url":"https://api.github.com/repos/TomDLT/soft-dtw/issues{/number}","pulls_url":"https://api.github.com/repos/TomDLT/soft-dtw/pulls{/number}","milestones_url":"https://api.github.com/repos/TomDLT/soft-dtw/milestones{/number}","notifications_url":"https://api.github.com/repos/TomDLT/soft-dtw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TomDLT/soft-dtw/labels{/name}","releases_url":"https://api.github.com/repos/TomDLT/soft-dtw/releases{/id}","deployments_url":"https://api.github.com/repos/TomDLT/soft-dtw/deployments","created_at":"2018-03-23T15:04:06Z","updated_at":"2018-03-23T15:04:08Z","pushed_at":"2018-04-23T12:04:38Z","git_url":"git://github.com/TomDLT/soft-dtw.git","ssh_url":"git@github.com:TomDLT/soft-dtw.git","clone_url":"https://github.com/TomDLT/soft-dtw.git","svn_url":"https://github.com/TomDLT/soft-dtw","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mblondel:master","ref":"master","sha":"228a28d4cf27c3bf10a17e97dbf3941555e620c2","user":{"login":"mblondel","id":233706,"avatar_url":"https://avatars2.githubusercontent.com/u/233706?v=4","gravatar_id":"","url":"https://api.github.com/users/mblondel","html_url":"https://github.com/mblondel","followers_url":"https://api.github.com/users/mblondel/followers","following_url":"https://api.github.com/users/mblondel/following{/other_user}","gists_url":"https://api.github.com/users/mblondel/gists{/gist_id}","starred_url":"https://api.github.com/users/mblondel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblondel/subscriptions","organizations_url":"https://api.github.com/users/mblondel/orgs","repos_url":"https://api.github.com/users/mblondel/repos","events_url":"https://api.github.com/users/mblondel/events{/privacy}","received_events_url":"https://api.github.com/users/mblondel/received_events","type":"User","site_admin":false},"repo":{"id":93255712,"name":"soft-dtw","full_name":"mblondel/soft-dtw","owner":{"login":"mblondel","id":233706,"avatar_url":"https://avatars2.githubusercontent.com/u/233706?v=4","gravatar_id":"","url":"https://api.github.com/users/mblondel","html_url":"https://github.com/mblondel","followers_url":"https://api.github.com/users/mblondel/followers","following_url":"https://api.github.com/users/mblondel/following{/other_user}","gists_url":"https://api.github.com/users/mblondel/gists{/gist_id}","starred_url":"https://api.github.com/users/mblondel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblondel/subscriptions","organizations_url":"https://api.github.com/users/mblondel/orgs","repos_url":"https://api.github.com/users/mblondel/repos","events_url":"https://api.github.com/users/mblondel/events{/privacy}","received_events_url":"https://api.github.com/users/mblondel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mblondel/soft-dtw","description":"Python implementation of soft-DTW.","fork":false,"url":"https://api.github.com/repos/mblondel/soft-dtw","forks_url":"https://api.github.com/repos/mblondel/soft-dtw/forks","keys_url":"https://api.github.com/repos/mblondel/soft-dtw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mblondel/soft-dtw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mblondel/soft-dtw/teams","hooks_url":"https://api.github.com/repos/mblondel/soft-dtw/hooks","issue_events_url":"https://api.github.com/repos/mblondel/soft-dtw/issues/events{/number}","events_url":"https://api.github.com/repos/mblondel/soft-dtw/events","assignees_url":"https://api.github.com/repos/mblondel/soft-dtw/assignees{/user}","branches_url":"https://api.github.com/repos/mblondel/soft-dtw/branches{/branch}","tags_url":"https://api.github.com/repos/mblondel/soft-dtw/tags","blobs_url":"https://api.github.com/repos/mblondel/soft-dtw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mblondel/soft-dtw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mblondel/soft-dtw/git/refs{/sha}","trees_url":"https://api.github.com/repos/mblondel/soft-dtw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mblondel/soft-dtw/statuses/{sha}","languages_url":"https://api.github.com/repos/mblondel/soft-dtw/languages","stargazers_url":"https://api.github.com/repos/mblondel/soft-dtw/stargazers","contributors_url":"https://api.github.com/repos/mblondel/soft-dtw/contributors","subscribers_url":"https://api.github.com/repos/mblondel/soft-dtw/subscribers","subscription_url":"https://api.github.com/repos/mblondel/soft-dtw/subscription","commits_url":"https://api.github.com/repos/mblondel/soft-dtw/commits{/sha}","git_commits_url":"https://api.github.com/repos/mblondel/soft-dtw/git/commits{/sha}","comments_url":"https://api.github.com/repos/mblondel/soft-dtw/comments{/number}","issue_comment_url":"https://api.github.com/repos/mblondel/soft-dtw/issues/comments{/number}","contents_url":"https://api.github.com/repos/mblondel/soft-dtw/contents/{+path}","compare_url":"https://api.github.com/repos/mblondel/soft-dtw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mblondel/soft-dtw/merges","archive_url":"https://api.github.com/repos/mblondel/soft-dtw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mblondel/soft-dtw/downloads","issues_url":"https://api.github.com/repos/mblondel/soft-dtw/issues{/number}","pulls_url":"https://api.github.com/repos/mblondel/soft-dtw/pulls{/number}","milestones_url":"https://api.github.com/repos/mblondel/soft-dtw/milestones{/number}","notifications_url":"https://api.github.com/repos/mblondel/soft-dtw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mblondel/soft-dtw/labels{/name}","releases_url":"https://api.github.com/repos/mblondel/soft-dtw/releases{/id}","deployments_url":"https://api.github.com/repos/mblondel/soft-dtw/deployments","created_at":"2017-06-03T15:08:57Z","updated_at":"2018-04-23T06:48:58Z","pushed_at":"2018-04-23T12:04:40Z","git_url":"git://github.com/mblondel/soft-dtw.git","ssh_url":"git@github.com:mblondel/soft-dtw.git","clone_url":"https://github.com/mblondel/soft-dtw.git","svn_url":"https://github.com/mblondel/soft-dtw","homepage":null,"size":23,"stargazers_count":91,"watchers_count":91,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":24,"open_issues":5,"watchers":91,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mblondel/soft-dtw/pulls/9"},"html":{"href":"https://github.com/mblondel/soft-dtw/pull/9"},"issue":{"href":"https://api.github.com/repos/mblondel/soft-dtw/issues/9"},"comments":{"href":"https://api.github.com/repos/mblondel/soft-dtw/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/mblondel/soft-dtw/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/mblondel/soft-dtw/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mblondel/soft-dtw/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/mblondel/soft-dtw/statuses/2a19dcb45ba24786dde6cbafed58c13c58174101"}},"author_association":"NONE"}}
{"actor":{"display_login":"TomDLT"}}