{"action":"created","comment":{"url":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/comments/85902815","pull_request_review_id":6588820,"id":85902815,"diff_hunk":"@@ -320,14 +315,14 @@ def score_sg_pair(model, word, word2):\n     l1 = model.syn0[word2.index]\n     l2a = deepcopy(model.syn1[word.point])  # 2d matrix, codelen x layer1_size\n     sgn = (-1.0)**word.code  # ch function, 0-> 1, 1 -> -1\n-    lprob = -log(1.0 + exp(-sgn*dot(l1, l2a.T)))\n+    lprob = log(expit(sgn * dot(l1, l2a.T)))\n     return sum(lprob)\n \n \n def score_cbow_pair(model, word, word2_indices, l1):\n     l2a = model.syn1[word.point]  # 2d matrix, codelen x layer1_size\n     sgn = (-1.0)**word.code  # ch function, 0-> 1, 1 -> -1\n-    lprob = -log(1.0 + exp(-sgn*dot(l1, l2a.T)))\n+    lprob = log(expit(sgn * dot(l1, l2a.T)))","path":"gensim/models/word2vec.py","position":71,"original_position":71,"commit_id":"e5b8bfdb95b02167a30ddc99e6c289469dfbba13","original_commit_id":"e5b8bfdb95b02167a30ddc99e6c289469dfbba13","user":{"login":"piskvorky","id":610412,"avatar_url":"https://avatars.githubusercontent.com/u/610412?v=3","gravatar_id":"","url":"https://api.github.com/users/piskvorky","html_url":"https://github.com/piskvorky","followers_url":"https://api.github.com/users/piskvorky/followers","following_url":"https://api.github.com/users/piskvorky/following{/other_user}","gists_url":"https://api.github.com/users/piskvorky/gists{/gist_id}","starred_url":"https://api.github.com/users/piskvorky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piskvorky/subscriptions","organizations_url":"https://api.github.com/users/piskvorky/orgs","repos_url":"https://api.github.com/users/piskvorky/repos","events_url":"https://api.github.com/users/piskvorky/events{/privacy}","received_events_url":"https://api.github.com/users/piskvorky/received_events","type":"User","site_admin":false},"body":"Not directly related to this PR, but since we're on the topic, there's a function in numpy for safely adding up logs of exps: `numpy.logaddexp(0, sgn * dot(l1, l2a.T))`.","created_at":"2016-11-01T10:14:34Z","updated_at":"2016-11-01T10:14:34Z","html_url":"https://github.com/RaRe-Technologies/gensim/pull/990#discussion_r85902815","pull_request_url":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/990","_links":{"self":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/comments/85902815"},"html":{"href":"https://github.com/RaRe-Technologies/gensim/pull/990#discussion_r85902815"},"pull_request":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/990"}}},"pull_request":{"url":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/990","id":91749033,"html_url":"https://github.com/RaRe-Technologies/gensim/pull/990","diff_url":"https://github.com/RaRe-Technologies/gensim/pull/990.diff","patch_url":"https://github.com/RaRe-Technologies/gensim/pull/990.patch","issue_url":"https://api.github.com/repos/RaRe-Technologies/gensim/issues/990","number":990,"state":"open","locked":false,"title":"Optimising sigmoid function everywhere","user":{"login":"markroxor","id":11366315,"avatar_url":"https://avatars.githubusercontent.com/u/11366315?v=3","gravatar_id":"","url":"https://api.github.com/users/markroxor","html_url":"https://github.com/markroxor","followers_url":"https://api.github.com/users/markroxor/followers","following_url":"https://api.github.com/users/markroxor/following{/other_user}","gists_url":"https://api.github.com/users/markroxor/gists{/gist_id}","starred_url":"https://api.github.com/users/markroxor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markroxor/subscriptions","organizations_url":"https://api.github.com/users/markroxor/orgs","repos_url":"https://api.github.com/users/markroxor/repos","events_url":"https://api.github.com/users/markroxor/events{/privacy}","received_events_url":"https://api.github.com/users/markroxor/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-01T08:46:06Z","updated_at":"2016-11-01T10:14:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb328641e0efb538f4ae3c76a7594bcaeec68f5f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/990/commits","review_comments_url":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/990/comments","review_comment_url":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RaRe-Technologies/gensim/issues/990/comments","statuses_url":"https://api.github.com/repos/RaRe-Technologies/gensim/statuses/e5b8bfdb95b02167a30ddc99e6c289469dfbba13","head":{"label":"markroxor:895","ref":"895","sha":"e5b8bfdb95b02167a30ddc99e6c289469dfbba13","user":{"login":"markroxor","id":11366315,"avatar_url":"https://avatars.githubusercontent.com/u/11366315?v=3","gravatar_id":"","url":"https://api.github.com/users/markroxor","html_url":"https://github.com/markroxor","followers_url":"https://api.github.com/users/markroxor/followers","following_url":"https://api.github.com/users/markroxor/following{/other_user}","gists_url":"https://api.github.com/users/markroxor/gists{/gist_id}","starred_url":"https://api.github.com/users/markroxor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markroxor/subscriptions","organizations_url":"https://api.github.com/users/markroxor/orgs","repos_url":"https://api.github.com/users/markroxor/repos","events_url":"https://api.github.com/users/markroxor/events{/privacy}","received_events_url":"https://api.github.com/users/markroxor/received_events","type":"User","site_admin":false},"repo":{"id":69356880,"name":"gensim","full_name":"markroxor/gensim","owner":{"login":"markroxor","id":11366315,"avatar_url":"https://avatars.githubusercontent.com/u/11366315?v=3","gravatar_id":"","url":"https://api.github.com/users/markroxor","html_url":"https://github.com/markroxor","followers_url":"https://api.github.com/users/markroxor/followers","following_url":"https://api.github.com/users/markroxor/following{/other_user}","gists_url":"https://api.github.com/users/markroxor/gists{/gist_id}","starred_url":"https://api.github.com/users/markroxor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markroxor/subscriptions","organizations_url":"https://api.github.com/users/markroxor/orgs","repos_url":"https://api.github.com/users/markroxor/repos","events_url":"https://api.github.com/users/markroxor/events{/privacy}","received_events_url":"https://api.github.com/users/markroxor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/markroxor/gensim","description":"Topic Modelling for Humans","fork":true,"url":"https://api.github.com/repos/markroxor/gensim","forks_url":"https://api.github.com/repos/markroxor/gensim/forks","keys_url":"https://api.github.com/repos/markroxor/gensim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/markroxor/gensim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/markroxor/gensim/teams","hooks_url":"https://api.github.com/repos/markroxor/gensim/hooks","issue_events_url":"https://api.github.com/repos/markroxor/gensim/issues/events{/number}","events_url":"https://api.github.com/repos/markroxor/gensim/events","assignees_url":"https://api.github.com/repos/markroxor/gensim/assignees{/user}","branches_url":"https://api.github.com/repos/markroxor/gensim/branches{/branch}","tags_url":"https://api.github.com/repos/markroxor/gensim/tags","blobs_url":"https://api.github.com/repos/markroxor/gensim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/markroxor/gensim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/markroxor/gensim/git/refs{/sha}","trees_url":"https://api.github.com/repos/markroxor/gensim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/markroxor/gensim/statuses/{sha}","languages_url":"https://api.github.com/repos/markroxor/gensim/languages","stargazers_url":"https://api.github.com/repos/markroxor/gensim/stargazers","contributors_url":"https://api.github.com/repos/markroxor/gensim/contributors","subscribers_url":"https://api.github.com/repos/markroxor/gensim/subscribers","subscription_url":"https://api.github.com/repos/markroxor/gensim/subscription","commits_url":"https://api.github.com/repos/markroxor/gensim/commits{/sha}","git_commits_url":"https://api.github.com/repos/markroxor/gensim/git/commits{/sha}","comments_url":"https://api.github.com/repos/markroxor/gensim/comments{/number}","issue_comment_url":"https://api.github.com/repos/markroxor/gensim/issues/comments{/number}","contents_url":"https://api.github.com/repos/markroxor/gensim/contents/{+path}","compare_url":"https://api.github.com/repos/markroxor/gensim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/markroxor/gensim/merges","archive_url":"https://api.github.com/repos/markroxor/gensim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/markroxor/gensim/downloads","issues_url":"https://api.github.com/repos/markroxor/gensim/issues{/number}","pulls_url":"https://api.github.com/repos/markroxor/gensim/pulls{/number}","milestones_url":"https://api.github.com/repos/markroxor/gensim/milestones{/number}","notifications_url":"https://api.github.com/repos/markroxor/gensim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/markroxor/gensim/labels{/name}","releases_url":"https://api.github.com/repos/markroxor/gensim/releases{/id}","deployments_url":"https://api.github.com/repos/markroxor/gensim/deployments","created_at":"2016-09-27T13:00:13Z","updated_at":"2016-09-27T13:00:14Z","pushed_at":"2016-11-01T08:43:21Z","git_url":"git://github.com/markroxor/gensim.git","ssh_url":"git@github.com:markroxor/gensim.git","clone_url":"https://github.com/markroxor/gensim.git","svn_url":"https://github.com/markroxor/gensim","homepage":"http://radimrehurek.com/gensim/","size":23042,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"RaRe-Technologies:develop","ref":"develop","sha":"6ccebf00c11113067f9650c81f359c35f74e7c58","user":{"login":"RaRe-Technologies","id":12515886,"avatar_url":"https://avatars.githubusercontent.com/u/12515886?v=3","gravatar_id":"","url":"https://api.github.com/users/RaRe-Technologies","html_url":"https://github.com/RaRe-Technologies","followers_url":"https://api.github.com/users/RaRe-Technologies/followers","following_url":"https://api.github.com/users/RaRe-Technologies/following{/other_user}","gists_url":"https://api.github.com/users/RaRe-Technologies/gists{/gist_id}","starred_url":"https://api.github.com/users/RaRe-Technologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaRe-Technologies/subscriptions","organizations_url":"https://api.github.com/users/RaRe-Technologies/orgs","repos_url":"https://api.github.com/users/RaRe-Technologies/repos","events_url":"https://api.github.com/users/RaRe-Technologies/events{/privacy}","received_events_url":"https://api.github.com/users/RaRe-Technologies/received_events","type":"Organization","site_admin":false},"repo":{"id":1349775,"name":"gensim","full_name":"RaRe-Technologies/gensim","owner":{"login":"RaRe-Technologies","id":12515886,"avatar_url":"https://avatars.githubusercontent.com/u/12515886?v=3","gravatar_id":"","url":"https://api.github.com/users/RaRe-Technologies","html_url":"https://github.com/RaRe-Technologies","followers_url":"https://api.github.com/users/RaRe-Technologies/followers","following_url":"https://api.github.com/users/RaRe-Technologies/following{/other_user}","gists_url":"https://api.github.com/users/RaRe-Technologies/gists{/gist_id}","starred_url":"https://api.github.com/users/RaRe-Technologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaRe-Technologies/subscriptions","organizations_url":"https://api.github.com/users/RaRe-Technologies/orgs","repos_url":"https://api.github.com/users/RaRe-Technologies/repos","events_url":"https://api.github.com/users/RaRe-Technologies/events{/privacy}","received_events_url":"https://api.github.com/users/RaRe-Technologies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RaRe-Technologies/gensim","description":"Topic Modelling for Humans","fork":false,"url":"https://api.github.com/repos/RaRe-Technologies/gensim","forks_url":"https://api.github.com/repos/RaRe-Technologies/gensim/forks","keys_url":"https://api.github.com/repos/RaRe-Technologies/gensim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RaRe-Technologies/gensim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RaRe-Technologies/gensim/teams","hooks_url":"https://api.github.com/repos/RaRe-Technologies/gensim/hooks","issue_events_url":"https://api.github.com/repos/RaRe-Technologies/gensim/issues/events{/number}","events_url":"https://api.github.com/repos/RaRe-Technologies/gensim/events","assignees_url":"https://api.github.com/repos/RaRe-Technologies/gensim/assignees{/user}","branches_url":"https://api.github.com/repos/RaRe-Technologies/gensim/branches{/branch}","tags_url":"https://api.github.com/repos/RaRe-Technologies/gensim/tags","blobs_url":"https://api.github.com/repos/RaRe-Technologies/gensim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RaRe-Technologies/gensim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RaRe-Technologies/gensim/git/refs{/sha}","trees_url":"https://api.github.com/repos/RaRe-Technologies/gensim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RaRe-Technologies/gensim/statuses/{sha}","languages_url":"https://api.github.com/repos/RaRe-Technologies/gensim/languages","stargazers_url":"https://api.github.com/repos/RaRe-Technologies/gensim/stargazers","contributors_url":"https://api.github.com/repos/RaRe-Technologies/gensim/contributors","subscribers_url":"https://api.github.com/repos/RaRe-Technologies/gensim/subscribers","subscription_url":"https://api.github.com/repos/RaRe-Technologies/gensim/subscription","commits_url":"https://api.github.com/repos/RaRe-Technologies/gensim/commits{/sha}","git_commits_url":"https://api.github.com/repos/RaRe-Technologies/gensim/git/commits{/sha}","comments_url":"https://api.github.com/repos/RaRe-Technologies/gensim/comments{/number}","issue_comment_url":"https://api.github.com/repos/RaRe-Technologies/gensim/issues/comments{/number}","contents_url":"https://api.github.com/repos/RaRe-Technologies/gensim/contents/{+path}","compare_url":"https://api.github.com/repos/RaRe-Technologies/gensim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RaRe-Technologies/gensim/merges","archive_url":"https://api.github.com/repos/RaRe-Technologies/gensim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RaRe-Technologies/gensim/downloads","issues_url":"https://api.github.com/repos/RaRe-Technologies/gensim/issues{/number}","pulls_url":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls{/number}","milestones_url":"https://api.github.com/repos/RaRe-Technologies/gensim/milestones{/number}","notifications_url":"https://api.github.com/repos/RaRe-Technologies/gensim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RaRe-Technologies/gensim/labels{/name}","releases_url":"https://api.github.com/repos/RaRe-Technologies/gensim/releases{/id}","deployments_url":"https://api.github.com/repos/RaRe-Technologies/gensim/deployments","created_at":"2011-02-10T07:43:04Z","updated_at":"2016-11-01T09:17:32Z","pushed_at":"2016-11-01T08:46:06Z","git_url":"git://github.com/RaRe-Technologies/gensim.git","ssh_url":"git@github.com:RaRe-Technologies/gensim.git","clone_url":"https://github.com/RaRe-Technologies/gensim.git","svn_url":"https://github.com/RaRe-Technologies/gensim","homepage":"http://radimrehurek.com/gensim/","size":33249,"stargazers_count":3173,"watchers_count":3173,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1192,"mirror_url":null,"open_issues_count":149,"forks":1192,"open_issues":149,"watchers":3173,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/990"},"html":{"href":"https://github.com/RaRe-Technologies/gensim/pull/990"},"issue":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/issues/990"},"comments":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/issues/990/comments"},"review_comments":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/990/comments"},"review_comment":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/pulls/990/commits"},"statuses":{"href":"https://api.github.com/repos/RaRe-Technologies/gensim/statuses/e5b8bfdb95b02167a30ddc99e6c289469dfbba13"}}}}
{"actor":{"display_login":"piskvorky"}}