{"action":"created","comment":{"url":"https://api.github.com/repos/odlgroup/odl/pulls/comments/77522276","id":77522276,"diff_hunk":"@@ -1079,6 +1080,91 @@ def _call(self, x, out):\n     return ProximalCConjKL\n \n \n+def proximal_cconj_kl_version_two(space, lam=1, g=None):\n+    \"\"\"Proximal operator factory of the convex conjugate of the KL divergence.\n+\n+    Function returning the proximal operator of the convex conjugate of the\n+    functional F where F is the entropy-type Kullback-Leibler (KL) divergence\n+\n+        F(x) = sum_i (xln(pos(x)) - xln(g) + g - x)_i + ind_P(x)\n+\n+    with x and g in X and g non-negative. The indicator function ind_P(x)\n+    for the positive elements of x is used to restrict the domain of F such\n+    that F is defined over whole X. The non-negativity thresholding pos is\n+    used to define F in the real numbers.\n+\n+    The convex conjugate F^* of F is\n+\n+        F^*(p) = sum_i (g (exp(p) - 1))_i\n+\n+    where p is the variable dual to x.\n+\n+    The proximal operator of the convex conjugate of F is\n+\n+        prox[sigma * (lam*F)^*](x)_i =\n+            x_i - lam W(1/lam sigma g_i exp(1/lam * x_i))","path":"odl/solvers/advanced/proximal_operators.py","position":61,"original_position":61,"commit_id":"edf8d8b1411a87bf653f80b0e8e36f01f8d0ccb9","original_commit_id":"edf8d8b1411a87bf653f80b0e8e36f01f8d0ccb9","user":{"login":"adler-j","id":2202312,"avatar_url":"https://avatars.githubusercontent.com/u/2202312?v=3","gravatar_id":"","url":"https://api.github.com/users/adler-j","html_url":"https://github.com/adler-j","followers_url":"https://api.github.com/users/adler-j/followers","following_url":"https://api.github.com/users/adler-j/following{/other_user}","gists_url":"https://api.github.com/users/adler-j/gists{/gist_id}","starred_url":"https://api.github.com/users/adler-j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adler-j/subscriptions","organizations_url":"https://api.github.com/users/adler-j/orgs","repos_url":"https://api.github.com/users/adler-j/repos","events_url":"https://api.github.com/users/adler-j/events{/privacy}","received_events_url":"https://api.github.com/users/adler-j/received_events","type":"User","site_admin":false},"body":"might as well shorten some things:\r\n\r\n`1 /lam * x_i` -> `x_i / lam` etc","created_at":"2016-09-05T13:30:43Z","updated_at":"2016-09-05T13:30:43Z","html_url":"https://github.com/odlgroup/odl/pull/561#discussion_r77522276","pull_request_url":"https://api.github.com/repos/odlgroup/odl/pulls/561","_links":{"self":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/comments/77522276"},"html":{"href":"https://github.com/odlgroup/odl/pull/561#discussion_r77522276"},"pull_request":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/561"}}},"pull_request":{"url":"https://api.github.com/repos/odlgroup/odl/pulls/561","id":83996313,"html_url":"https://github.com/odlgroup/odl/pull/561","diff_url":"https://github.com/odlgroup/odl/pull/561.diff","patch_url":"https://github.com/odlgroup/odl/pull/561.patch","issue_url":"https://api.github.com/repos/odlgroup/odl/issues/561","number":561,"state":"open","locked":false,"title":"ENH: Add proximal operator for second kind of KL-divergence.","user":{"login":"aringh","id":15774494,"avatar_url":"https://avatars.githubusercontent.com/u/15774494?v=3","gravatar_id":"","url":"https://api.github.com/users/aringh","html_url":"https://github.com/aringh","followers_url":"https://api.github.com/users/aringh/followers","following_url":"https://api.github.com/users/aringh/following{/other_user}","gists_url":"https://api.github.com/users/aringh/gists{/gist_id}","starred_url":"https://api.github.com/users/aringh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aringh/subscriptions","organizations_url":"https://api.github.com/users/aringh/orgs","repos_url":"https://api.github.com/users/aringh/repos","events_url":"https://api.github.com/users/aringh/events{/privacy}","received_events_url":"https://api.github.com/users/aringh/received_events","type":"User","site_admin":false},"body":"It adds the proximal operator for the convex conjugate of the second kind of the KL-divergence: `f(x) = sum_i (x_i log(x_i) - x_i log(g_i) + g_i - x_i`.\r\n\r\nThe naming is an issue here... what should we call the two different KL-divergences? The current name is temporary.\r\n\r\nThe two functionals are highly related as they only difference is that the prior and the variable changes place in expression. However, they are two different functionals with a bit different characteristics.\r\n\r\nEDIT: It also contains a few update in the doc of the proximal operator for the previous KL-divergence (typos).","created_at":"2016-09-05T12:39:52Z","updated_at":"2016-09-05T13:30:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bca2081d94378a84ed8092d1f180614a29cbdee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/odlgroup/odl/pulls/561/commits","review_comments_url":"https://api.github.com/repos/odlgroup/odl/pulls/561/comments","review_comment_url":"https://api.github.com/repos/odlgroup/odl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odlgroup/odl/issues/561/comments","statuses_url":"https://api.github.com/repos/odlgroup/odl/statuses/edf8d8b1411a87bf653f80b0e8e36f01f8d0ccb9","head":{"label":"odlgroup:second_type_kl_divergence","ref":"second_type_kl_divergence","sha":"edf8d8b1411a87bf653f80b0e8e36f01f8d0ccb9","user":{"login":"odlgroup","id":15667171,"avatar_url":"https://avatars.githubusercontent.com/u/15667171?v=3","gravatar_id":"","url":"https://api.github.com/users/odlgroup","html_url":"https://github.com/odlgroup","followers_url":"https://api.github.com/users/odlgroup/followers","following_url":"https://api.github.com/users/odlgroup/following{/other_user}","gists_url":"https://api.github.com/users/odlgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/odlgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odlgroup/subscriptions","organizations_url":"https://api.github.com/users/odlgroup/orgs","repos_url":"https://api.github.com/users/odlgroup/repos","events_url":"https://api.github.com/users/odlgroup/events{/privacy}","received_events_url":"https://api.github.com/users/odlgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":45596393,"name":"odl","full_name":"odlgroup/odl","owner":{"login":"odlgroup","id":15667171,"avatar_url":"https://avatars.githubusercontent.com/u/15667171?v=3","gravatar_id":"","url":"https://api.github.com/users/odlgroup","html_url":"https://github.com/odlgroup","followers_url":"https://api.github.com/users/odlgroup/followers","following_url":"https://api.github.com/users/odlgroup/following{/other_user}","gists_url":"https://api.github.com/users/odlgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/odlgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odlgroup/subscriptions","organizations_url":"https://api.github.com/users/odlgroup/orgs","repos_url":"https://api.github.com/users/odlgroup/repos","events_url":"https://api.github.com/users/odlgroup/events{/privacy}","received_events_url":"https://api.github.com/users/odlgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odlgroup/odl","description":"Operator Discretization Library","fork":false,"url":"https://api.github.com/repos/odlgroup/odl","forks_url":"https://api.github.com/repos/odlgroup/odl/forks","keys_url":"https://api.github.com/repos/odlgroup/odl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odlgroup/odl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odlgroup/odl/teams","hooks_url":"https://api.github.com/repos/odlgroup/odl/hooks","issue_events_url":"https://api.github.com/repos/odlgroup/odl/issues/events{/number}","events_url":"https://api.github.com/repos/odlgroup/odl/events","assignees_url":"https://api.github.com/repos/odlgroup/odl/assignees{/user}","branches_url":"https://api.github.com/repos/odlgroup/odl/branches{/branch}","tags_url":"https://api.github.com/repos/odlgroup/odl/tags","blobs_url":"https://api.github.com/repos/odlgroup/odl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odlgroup/odl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odlgroup/odl/git/refs{/sha}","trees_url":"https://api.github.com/repos/odlgroup/odl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odlgroup/odl/statuses/{sha}","languages_url":"https://api.github.com/repos/odlgroup/odl/languages","stargazers_url":"https://api.github.com/repos/odlgroup/odl/stargazers","contributors_url":"https://api.github.com/repos/odlgroup/odl/contributors","subscribers_url":"https://api.github.com/repos/odlgroup/odl/subscribers","subscription_url":"https://api.github.com/repos/odlgroup/odl/subscription","commits_url":"https://api.github.com/repos/odlgroup/odl/commits{/sha}","git_commits_url":"https://api.github.com/repos/odlgroup/odl/git/commits{/sha}","comments_url":"https://api.github.com/repos/odlgroup/odl/comments{/number}","issue_comment_url":"https://api.github.com/repos/odlgroup/odl/issues/comments{/number}","contents_url":"https://api.github.com/repos/odlgroup/odl/contents/{+path}","compare_url":"https://api.github.com/repos/odlgroup/odl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odlgroup/odl/merges","archive_url":"https://api.github.com/repos/odlgroup/odl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odlgroup/odl/downloads","issues_url":"https://api.github.com/repos/odlgroup/odl/issues{/number}","pulls_url":"https://api.github.com/repos/odlgroup/odl/pulls{/number}","milestones_url":"https://api.github.com/repos/odlgroup/odl/milestones{/number}","notifications_url":"https://api.github.com/repos/odlgroup/odl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odlgroup/odl/labels{/name}","releases_url":"https://api.github.com/repos/odlgroup/odl/releases{/id}","deployments_url":"https://api.github.com/repos/odlgroup/odl/deployments","created_at":"2015-11-05T07:57:55Z","updated_at":"2016-09-02T10:02:53Z","pushed_at":"2016-09-05T12:39:52Z","git_url":"git://github.com/odlgroup/odl.git","ssh_url":"git@github.com:odlgroup/odl.git","clone_url":"https://github.com/odlgroup/odl.git","svn_url":"https://github.com/odlgroup/odl","homepage":null,"size":30205,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":114,"forks":7,"open_issues":114,"watchers":12,"default_branch":"master"}},"base":{"label":"odlgroup:master","ref":"master","sha":"b1f2b5a77d84b11faa2e451d966fe3284ac69fb4","user":{"login":"odlgroup","id":15667171,"avatar_url":"https://avatars.githubusercontent.com/u/15667171?v=3","gravatar_id":"","url":"https://api.github.com/users/odlgroup","html_url":"https://github.com/odlgroup","followers_url":"https://api.github.com/users/odlgroup/followers","following_url":"https://api.github.com/users/odlgroup/following{/other_user}","gists_url":"https://api.github.com/users/odlgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/odlgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odlgroup/subscriptions","organizations_url":"https://api.github.com/users/odlgroup/orgs","repos_url":"https://api.github.com/users/odlgroup/repos","events_url":"https://api.github.com/users/odlgroup/events{/privacy}","received_events_url":"https://api.github.com/users/odlgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":45596393,"name":"odl","full_name":"odlgroup/odl","owner":{"login":"odlgroup","id":15667171,"avatar_url":"https://avatars.githubusercontent.com/u/15667171?v=3","gravatar_id":"","url":"https://api.github.com/users/odlgroup","html_url":"https://github.com/odlgroup","followers_url":"https://api.github.com/users/odlgroup/followers","following_url":"https://api.github.com/users/odlgroup/following{/other_user}","gists_url":"https://api.github.com/users/odlgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/odlgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odlgroup/subscriptions","organizations_url":"https://api.github.com/users/odlgroup/orgs","repos_url":"https://api.github.com/users/odlgroup/repos","events_url":"https://api.github.com/users/odlgroup/events{/privacy}","received_events_url":"https://api.github.com/users/odlgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odlgroup/odl","description":"Operator Discretization Library","fork":false,"url":"https://api.github.com/repos/odlgroup/odl","forks_url":"https://api.github.com/repos/odlgroup/odl/forks","keys_url":"https://api.github.com/repos/odlgroup/odl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odlgroup/odl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odlgroup/odl/teams","hooks_url":"https://api.github.com/repos/odlgroup/odl/hooks","issue_events_url":"https://api.github.com/repos/odlgroup/odl/issues/events{/number}","events_url":"https://api.github.com/repos/odlgroup/odl/events","assignees_url":"https://api.github.com/repos/odlgroup/odl/assignees{/user}","branches_url":"https://api.github.com/repos/odlgroup/odl/branches{/branch}","tags_url":"https://api.github.com/repos/odlgroup/odl/tags","blobs_url":"https://api.github.com/repos/odlgroup/odl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odlgroup/odl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odlgroup/odl/git/refs{/sha}","trees_url":"https://api.github.com/repos/odlgroup/odl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odlgroup/odl/statuses/{sha}","languages_url":"https://api.github.com/repos/odlgroup/odl/languages","stargazers_url":"https://api.github.com/repos/odlgroup/odl/stargazers","contributors_url":"https://api.github.com/repos/odlgroup/odl/contributors","subscribers_url":"https://api.github.com/repos/odlgroup/odl/subscribers","subscription_url":"https://api.github.com/repos/odlgroup/odl/subscription","commits_url":"https://api.github.com/repos/odlgroup/odl/commits{/sha}","git_commits_url":"https://api.github.com/repos/odlgroup/odl/git/commits{/sha}","comments_url":"https://api.github.com/repos/odlgroup/odl/comments{/number}","issue_comment_url":"https://api.github.com/repos/odlgroup/odl/issues/comments{/number}","contents_url":"https://api.github.com/repos/odlgroup/odl/contents/{+path}","compare_url":"https://api.github.com/repos/odlgroup/odl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odlgroup/odl/merges","archive_url":"https://api.github.com/repos/odlgroup/odl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odlgroup/odl/downloads","issues_url":"https://api.github.com/repos/odlgroup/odl/issues{/number}","pulls_url":"https://api.github.com/repos/odlgroup/odl/pulls{/number}","milestones_url":"https://api.github.com/repos/odlgroup/odl/milestones{/number}","notifications_url":"https://api.github.com/repos/odlgroup/odl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odlgroup/odl/labels{/name}","releases_url":"https://api.github.com/repos/odlgroup/odl/releases{/id}","deployments_url":"https://api.github.com/repos/odlgroup/odl/deployments","created_at":"2015-11-05T07:57:55Z","updated_at":"2016-09-02T10:02:53Z","pushed_at":"2016-09-05T12:39:52Z","git_url":"git://github.com/odlgroup/odl.git","ssh_url":"git@github.com:odlgroup/odl.git","clone_url":"https://github.com/odlgroup/odl.git","svn_url":"https://github.com/odlgroup/odl","homepage":null,"size":30205,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":114,"forks":7,"open_issues":114,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/561"},"html":{"href":"https://github.com/odlgroup/odl/pull/561"},"issue":{"href":"https://api.github.com/repos/odlgroup/odl/issues/561"},"comments":{"href":"https://api.github.com/repos/odlgroup/odl/issues/561/comments"},"review_comments":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/561/comments"},"review_comment":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/561/commits"},"statuses":{"href":"https://api.github.com/repos/odlgroup/odl/statuses/edf8d8b1411a87bf653f80b0e8e36f01f8d0ccb9"}}}}
{"actor":{"display_login":"adler-j"}}