{"action":"created","comment":{"url":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/comments/59006465","id":59006465,"diff_hunk":"@@ -341,6 +342,24 @@ class GraphNodeAssignment : public Nice2Assignment {\n     return label_set_->GetLabelName(label_id);\n   }\n \n+  // Returns conditional probability of a label conditionated on its neighbouring labels\n+  double GetNodeConditionalProbabilityGivenNeighbours(const GraphInference& fweights, int node, const double normalization, int label) const {\n+    return exp(GetNodeScoreGivenAssignmentToANode(fweights, node, node, label)) / normalization;\n+  }\n+\n+  // Returns the normalization related to a certain node\n+  double GetNodeNormalizationConstantGivenNeighbours(const GraphInference& fweights, int node, std::vector<int>* candidates) const {","path":"src/inference/graph_inference.cpp","position":27,"original_position":27,"commit_id":"b297e1e40bfaba1811e1835ffd9d77a1a52e8fab","original_commit_id":"b297e1e40bfaba1811e1835ffd9d77a1a52e8fab","user":{"login":"pamatteo","id":6368188,"avatar_url":"https://avatars.githubusercontent.com/u/6368188?v=3","gravatar_id":"","url":"https://api.github.com/users/pamatteo","html_url":"https://github.com/pamatteo","followers_url":"https://api.github.com/users/pamatteo/followers","following_url":"https://api.github.com/users/pamatteo/following{/other_user}","gists_url":"https://api.github.com/users/pamatteo/gists{/gist_id}","starred_url":"https://api.github.com/users/pamatteo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pamatteo/subscriptions","organizations_url":"https://api.github.com/users/pamatteo/orgs","repos_url":"https://api.github.com/users/pamatteo/repos","events_url":"https://api.github.com/users/pamatteo/events{/privacy}","received_events_url":"https://api.github.com/users/pamatteo/received_events","type":"User","site_admin":false},"body":"In the normalisation, the first thing that I do is to add to the candidates vector the current  assignment of the node to which I am computing the estimated normalisation. As I said before now I see why this is better inside PLLearn. It would be more readable. ","created_at":"2016-04-08T10:25:54Z","updated_at":"2016-04-08T10:25:54Z","html_url":"https://github.com/eth-srl/Nice2Predict/pull/3#discussion_r59006465","pull_request_url":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/comments/59006465"},"html":{"href":"https://github.com/eth-srl/Nice2Predict/pull/3#discussion_r59006465"},"pull_request":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/3","id":65632753,"html_url":"https://github.com/eth-srl/Nice2Predict/pull/3","diff_url":"https://github.com/eth-srl/Nice2Predict/pull/3.diff","patch_url":"https://github.com/eth-srl/Nice2Predict/pull/3.patch","issue_url":"https://api.github.com/repos/eth-srl/Nice2Predict/issues/3","number":3,"state":"open","locked":false,"title":"Pseudo likelihood","user":{"login":"pamatteo","id":6368188,"avatar_url":"https://avatars.githubusercontent.com/u/6368188?v=3","gravatar_id":"","url":"https://api.github.com/users/pamatteo","html_url":"https://github.com/pamatteo","followers_url":"https://api.github.com/users/pamatteo/followers","following_url":"https://api.github.com/users/pamatteo/following{/other_user}","gists_url":"https://api.github.com/users/pamatteo/gists{/gist_id}","starred_url":"https://api.github.com/users/pamatteo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pamatteo/subscriptions","organizations_url":"https://api.github.com/users/pamatteo/orgs","repos_url":"https://api.github.com/users/pamatteo/repos","events_url":"https://api.github.com/users/pamatteo/events{/privacy}","received_events_url":"https://api.github.com/users/pamatteo/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-07T13:48:14Z","updated_at":"2016-04-08T10:25:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f77575254af03ec38cb135c2fb0ed7710de9a1e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/3/commits","review_comments_url":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/3/comments","review_comment_url":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eth-srl/Nice2Predict/issues/3/comments","statuses_url":"https://api.github.com/repos/eth-srl/Nice2Predict/statuses/b297e1e40bfaba1811e1835ffd9d77a1a52e8fab","head":{"label":"pamatteo:pseudo-likelihood","ref":"pseudo-likelihood","sha":"b297e1e40bfaba1811e1835ffd9d77a1a52e8fab","user":{"login":"pamatteo","id":6368188,"avatar_url":"https://avatars.githubusercontent.com/u/6368188?v=3","gravatar_id":"","url":"https://api.github.com/users/pamatteo","html_url":"https://github.com/pamatteo","followers_url":"https://api.github.com/users/pamatteo/followers","following_url":"https://api.github.com/users/pamatteo/following{/other_user}","gists_url":"https://api.github.com/users/pamatteo/gists{/gist_id}","starred_url":"https://api.github.com/users/pamatteo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pamatteo/subscriptions","organizations_url":"https://api.github.com/users/pamatteo/orgs","repos_url":"https://api.github.com/users/pamatteo/repos","events_url":"https://api.github.com/users/pamatteo/events{/privacy}","received_events_url":"https://api.github.com/users/pamatteo/received_events","type":"User","site_admin":false},"repo":{"id":52968508,"name":"Nice2Predict","full_name":"pamatteo/Nice2Predict","owner":{"login":"pamatteo","id":6368188,"avatar_url":"https://avatars.githubusercontent.com/u/6368188?v=3","gravatar_id":"","url":"https://api.github.com/users/pamatteo","html_url":"https://github.com/pamatteo","followers_url":"https://api.github.com/users/pamatteo/followers","following_url":"https://api.github.com/users/pamatteo/following{/other_user}","gists_url":"https://api.github.com/users/pamatteo/gists{/gist_id}","starred_url":"https://api.github.com/users/pamatteo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pamatteo/subscriptions","organizations_url":"https://api.github.com/users/pamatteo/orgs","repos_url":"https://api.github.com/users/pamatteo/repos","events_url":"https://api.github.com/users/pamatteo/events{/privacy}","received_events_url":"https://api.github.com/users/pamatteo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pamatteo/Nice2Predict","description":"Learning framework for program property prediction","fork":true,"url":"https://api.github.com/repos/pamatteo/Nice2Predict","forks_url":"https://api.github.com/repos/pamatteo/Nice2Predict/forks","keys_url":"https://api.github.com/repos/pamatteo/Nice2Predict/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pamatteo/Nice2Predict/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pamatteo/Nice2Predict/teams","hooks_url":"https://api.github.com/repos/pamatteo/Nice2Predict/hooks","issue_events_url":"https://api.github.com/repos/pamatteo/Nice2Predict/issues/events{/number}","events_url":"https://api.github.com/repos/pamatteo/Nice2Predict/events","assignees_url":"https://api.github.com/repos/pamatteo/Nice2Predict/assignees{/user}","branches_url":"https://api.github.com/repos/pamatteo/Nice2Predict/branches{/branch}","tags_url":"https://api.github.com/repos/pamatteo/Nice2Predict/tags","blobs_url":"https://api.github.com/repos/pamatteo/Nice2Predict/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pamatteo/Nice2Predict/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pamatteo/Nice2Predict/git/refs{/sha}","trees_url":"https://api.github.com/repos/pamatteo/Nice2Predict/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pamatteo/Nice2Predict/statuses/{sha}","languages_url":"https://api.github.com/repos/pamatteo/Nice2Predict/languages","stargazers_url":"https://api.github.com/repos/pamatteo/Nice2Predict/stargazers","contributors_url":"https://api.github.com/repos/pamatteo/Nice2Predict/contributors","subscribers_url":"https://api.github.com/repos/pamatteo/Nice2Predict/subscribers","subscription_url":"https://api.github.com/repos/pamatteo/Nice2Predict/subscription","commits_url":"https://api.github.com/repos/pamatteo/Nice2Predict/commits{/sha}","git_commits_url":"https://api.github.com/repos/pamatteo/Nice2Predict/git/commits{/sha}","comments_url":"https://api.github.com/repos/pamatteo/Nice2Predict/comments{/number}","issue_comment_url":"https://api.github.com/repos/pamatteo/Nice2Predict/issues/comments{/number}","contents_url":"https://api.github.com/repos/pamatteo/Nice2Predict/contents/{+path}","compare_url":"https://api.github.com/repos/pamatteo/Nice2Predict/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pamatteo/Nice2Predict/merges","archive_url":"https://api.github.com/repos/pamatteo/Nice2Predict/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pamatteo/Nice2Predict/downloads","issues_url":"https://api.github.com/repos/pamatteo/Nice2Predict/issues{/number}","pulls_url":"https://api.github.com/repos/pamatteo/Nice2Predict/pulls{/number}","milestones_url":"https://api.github.com/repos/pamatteo/Nice2Predict/milestones{/number}","notifications_url":"https://api.github.com/repos/pamatteo/Nice2Predict/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pamatteo/Nice2Predict/labels{/name}","releases_url":"https://api.github.com/repos/pamatteo/Nice2Predict/releases{/id}","deployments_url":"https://api.github.com/repos/pamatteo/Nice2Predict/deployments","created_at":"2016-03-02T14:20:39Z","updated_at":"2016-03-02T14:20:40Z","pushed_at":"2016-04-07T13:46:33Z","git_url":"git://github.com/pamatteo/Nice2Predict.git","ssh_url":"git@github.com:pamatteo/Nice2Predict.git","clone_url":"https://github.com/pamatteo/Nice2Predict.git","svn_url":"https://github.com/pamatteo/Nice2Predict","homepage":null,"size":1153,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"eth-srl:master","ref":"master","sha":"509b5d0b6854b7b7a68b95439372a1180f8cd256","user":{"login":"eth-srl","id":5363413,"avatar_url":"https://avatars.githubusercontent.com/u/5363413?v=3","gravatar_id":"","url":"https://api.github.com/users/eth-srl","html_url":"https://github.com/eth-srl","followers_url":"https://api.github.com/users/eth-srl/followers","following_url":"https://api.github.com/users/eth-srl/following{/other_user}","gists_url":"https://api.github.com/users/eth-srl/gists{/gist_id}","starred_url":"https://api.github.com/users/eth-srl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eth-srl/subscriptions","organizations_url":"https://api.github.com/users/eth-srl/orgs","repos_url":"https://api.github.com/users/eth-srl/repos","events_url":"https://api.github.com/users/eth-srl/events{/privacy}","received_events_url":"https://api.github.com/users/eth-srl/received_events","type":"Organization","site_admin":false},"repo":{"id":29053422,"name":"Nice2Predict","full_name":"eth-srl/Nice2Predict","owner":{"login":"eth-srl","id":5363413,"avatar_url":"https://avatars.githubusercontent.com/u/5363413?v=3","gravatar_id":"","url":"https://api.github.com/users/eth-srl","html_url":"https://github.com/eth-srl","followers_url":"https://api.github.com/users/eth-srl/followers","following_url":"https://api.github.com/users/eth-srl/following{/other_user}","gists_url":"https://api.github.com/users/eth-srl/gists{/gist_id}","starred_url":"https://api.github.com/users/eth-srl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eth-srl/subscriptions","organizations_url":"https://api.github.com/users/eth-srl/orgs","repos_url":"https://api.github.com/users/eth-srl/repos","events_url":"https://api.github.com/users/eth-srl/events{/privacy}","received_events_url":"https://api.github.com/users/eth-srl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eth-srl/Nice2Predict","description":"Learning framework for program property prediction","fork":false,"url":"https://api.github.com/repos/eth-srl/Nice2Predict","forks_url":"https://api.github.com/repos/eth-srl/Nice2Predict/forks","keys_url":"https://api.github.com/repos/eth-srl/Nice2Predict/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eth-srl/Nice2Predict/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eth-srl/Nice2Predict/teams","hooks_url":"https://api.github.com/repos/eth-srl/Nice2Predict/hooks","issue_events_url":"https://api.github.com/repos/eth-srl/Nice2Predict/issues/events{/number}","events_url":"https://api.github.com/repos/eth-srl/Nice2Predict/events","assignees_url":"https://api.github.com/repos/eth-srl/Nice2Predict/assignees{/user}","branches_url":"https://api.github.com/repos/eth-srl/Nice2Predict/branches{/branch}","tags_url":"https://api.github.com/repos/eth-srl/Nice2Predict/tags","blobs_url":"https://api.github.com/repos/eth-srl/Nice2Predict/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eth-srl/Nice2Predict/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eth-srl/Nice2Predict/git/refs{/sha}","trees_url":"https://api.github.com/repos/eth-srl/Nice2Predict/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eth-srl/Nice2Predict/statuses/{sha}","languages_url":"https://api.github.com/repos/eth-srl/Nice2Predict/languages","stargazers_url":"https://api.github.com/repos/eth-srl/Nice2Predict/stargazers","contributors_url":"https://api.github.com/repos/eth-srl/Nice2Predict/contributors","subscribers_url":"https://api.github.com/repos/eth-srl/Nice2Predict/subscribers","subscription_url":"https://api.github.com/repos/eth-srl/Nice2Predict/subscription","commits_url":"https://api.github.com/repos/eth-srl/Nice2Predict/commits{/sha}","git_commits_url":"https://api.github.com/repos/eth-srl/Nice2Predict/git/commits{/sha}","comments_url":"https://api.github.com/repos/eth-srl/Nice2Predict/comments{/number}","issue_comment_url":"https://api.github.com/repos/eth-srl/Nice2Predict/issues/comments{/number}","contents_url":"https://api.github.com/repos/eth-srl/Nice2Predict/contents/{+path}","compare_url":"https://api.github.com/repos/eth-srl/Nice2Predict/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eth-srl/Nice2Predict/merges","archive_url":"https://api.github.com/repos/eth-srl/Nice2Predict/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eth-srl/Nice2Predict/downloads","issues_url":"https://api.github.com/repos/eth-srl/Nice2Predict/issues{/number}","pulls_url":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls{/number}","milestones_url":"https://api.github.com/repos/eth-srl/Nice2Predict/milestones{/number}","notifications_url":"https://api.github.com/repos/eth-srl/Nice2Predict/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eth-srl/Nice2Predict/labels{/name}","releases_url":"https://api.github.com/repos/eth-srl/Nice2Predict/releases{/id}","deployments_url":"https://api.github.com/repos/eth-srl/Nice2Predict/deployments","created_at":"2015-01-10T09:59:59Z","updated_at":"2016-03-25T12:42:35Z","pushed_at":"2016-04-07T13:48:15Z","git_url":"git://github.com/eth-srl/Nice2Predict.git","ssh_url":"git@github.com:eth-srl/Nice2Predict.git","clone_url":"https://github.com/eth-srl/Nice2Predict.git","svn_url":"https://github.com/eth-srl/Nice2Predict","homepage":null,"size":1259,"stargazers_count":23,"watchers_count":23,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/3"},"html":{"href":"https://github.com/eth-srl/Nice2Predict/pull/3"},"issue":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/issues/3"},"comments":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/eth-srl/Nice2Predict/statuses/b297e1e40bfaba1811e1835ffd9d77a1a52e8fab"}}}}