{"action":"created","comment":{"url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/comments/213191033","pull_request_review_id":149973809,"id":213191033,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzE5MTAzMw==","diff_hunk":"@@ -87,6 +87,41 @@ def __init__(self, cri=None, bigdl_type=\"float\"):\n             cri = ClassNLLCriterion()\n         JavaValue.__init__(self, None, bigdl_type, cri)\n \n+class HitRatio(JavaValue):\n+    \"\"\"\n+    Hit Ratio(HR) used in recommandation application.\n+    HR intuitively measures whether the test item is present on the top-k list.\n+\n+    >>> hr10 = HitRatio(k = 10)\n+    creating: createHitRatio\n+    \"\"\"\n+    def __init__(self, k = 10, neg_num = 100, bigdl_type=\"float\"):\n+        \"\"\"\n+        Create hit ratio validation method.\n+\n+        :param k: top k\n+        :param neg_num: number of negative items.\n+        \"\"\"\n+        JavaValue.__init__(self, None, bigdl_type, k, neg_num)\n+\n+class Ndcg(JavaValue):","path":"pyspark/bigdl/optim/optimizer.py","position":21,"original_position":21,"commit_id":"863b4b1031c6ca5976767163798d50ee446978f9","original_commit_id":"863b4b1031c6ca5976767163798d50ee446978f9","user":{"login":"yiheng","id":1297418,"node_id":"MDQ6VXNlcjEyOTc0MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1297418?v=4","gravatar_id":"","url":"https://api.github.com/users/yiheng","html_url":"https://github.com/yiheng","followers_url":"https://api.github.com/users/yiheng/followers","following_url":"https://api.github.com/users/yiheng/following{/other_user}","gists_url":"https://api.github.com/users/yiheng/gists{/gist_id}","starred_url":"https://api.github.com/users/yiheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiheng/subscriptions","organizations_url":"https://api.github.com/users/yiheng/orgs","repos_url":"https://api.github.com/users/yiheng/repos","events_url":"https://api.github.com/users/yiheng/events{/privacy}","received_events_url":"https://api.github.com/users/yiheng/received_events","type":"User","site_admin":false},"body":"NDCG?","created_at":"2018-08-28T05:52:57Z","updated_at":"2018-08-28T05:52:57Z","html_url":"https://github.com/intel-analytics/BigDL/pull/2623#discussion_r213191033","pull_request_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/2623","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/comments/213191033"},"html":{"href":"https://github.com/intel-analytics/BigDL/pull/2623#discussion_r213191033"},"pull_request":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/2623"}}},"pull_request":{"url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/2623","id":211025893,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMDI1ODkz","html_url":"https://github.com/intel-analytics/BigDL/pull/2623","diff_url":"https://github.com/intel-analytics/BigDL/pull/2623.diff","patch_url":"https://github.com/intel-analytics/BigDL/pull/2623.patch","issue_url":"https://api.github.com/repos/intel-analytics/BigDL/issues/2623","number":2623,"state":"open","locked":false,"title":"[new feature]Hit Ratio and NDCG","user":{"login":"qiuxin2012","id":4495653,"node_id":"MDQ6VXNlcjQ0OTU2NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/4495653?v=4","gravatar_id":"","url":"https://api.github.com/users/qiuxin2012","html_url":"https://github.com/qiuxin2012","followers_url":"https://api.github.com/users/qiuxin2012/followers","following_url":"https://api.github.com/users/qiuxin2012/following{/other_user}","gists_url":"https://api.github.com/users/qiuxin2012/gists{/gist_id}","starred_url":"https://api.github.com/users/qiuxin2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiuxin2012/subscriptions","organizations_url":"https://api.github.com/users/qiuxin2012/orgs","repos_url":"https://api.github.com/users/qiuxin2012/repos","events_url":"https://api.github.com/users/qiuxin2012/events{/privacy}","received_events_url":"https://api.github.com/users/qiuxin2012/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nAdd validation methods Hit Ratio and NDCG.\r\n\r\nHR intuitively measures whether the test item is present on the top-k list.\r\nNDCG accounts for the position of the hit by assigning higher scores to hits at top ranks.\r\n\r\n## How was this patch tested?\r\n\r\nintegration tests\r\n\r\n","created_at":"2018-08-27T07:20:07Z","updated_at":"2018-08-28T05:52:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6de475185884d54f25acd0ca20d636099a211133","assignee":{"login":"yiheng","id":1297418,"node_id":"MDQ6VXNlcjEyOTc0MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1297418?v=4","gravatar_id":"","url":"https://api.github.com/users/yiheng","html_url":"https://github.com/yiheng","followers_url":"https://api.github.com/users/yiheng/followers","following_url":"https://api.github.com/users/yiheng/following{/other_user}","gists_url":"https://api.github.com/users/yiheng/gists{/gist_id}","starred_url":"https://api.github.com/users/yiheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiheng/subscriptions","organizations_url":"https://api.github.com/users/yiheng/orgs","repos_url":"https://api.github.com/users/yiheng/repos","events_url":"https://api.github.com/users/yiheng/events{/privacy}","received_events_url":"https://api.github.com/users/yiheng/received_events","type":"User","site_admin":false},"assignees":[{"login":"yiheng","id":1297418,"node_id":"MDQ6VXNlcjEyOTc0MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1297418?v=4","gravatar_id":"","url":"https://api.github.com/users/yiheng","html_url":"https://github.com/yiheng","followers_url":"https://api.github.com/users/yiheng/followers","following_url":"https://api.github.com/users/yiheng/following{/other_user}","gists_url":"https://api.github.com/users/yiheng/gists{/gist_id}","starred_url":"https://api.github.com/users/yiheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiheng/subscriptions","organizations_url":"https://api.github.com/users/yiheng/orgs","repos_url":"https://api.github.com/users/yiheng/repos","events_url":"https://api.github.com/users/yiheng/events{/privacy}","received_events_url":"https://api.github.com/users/yiheng/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/2623/commits","review_comments_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/2623/comments","review_comment_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intel-analytics/BigDL/issues/2623/comments","statuses_url":"https://api.github.com/repos/intel-analytics/BigDL/statuses/863b4b1031c6ca5976767163798d50ee446978f9","head":{"label":"qiuxin2012:hr10","ref":"hr10","sha":"863b4b1031c6ca5976767163798d50ee446978f9","user":{"login":"qiuxin2012","id":4495653,"node_id":"MDQ6VXNlcjQ0OTU2NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/4495653?v=4","gravatar_id":"","url":"https://api.github.com/users/qiuxin2012","html_url":"https://github.com/qiuxin2012","followers_url":"https://api.github.com/users/qiuxin2012/followers","following_url":"https://api.github.com/users/qiuxin2012/following{/other_user}","gists_url":"https://api.github.com/users/qiuxin2012/gists{/gist_id}","starred_url":"https://api.github.com/users/qiuxin2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiuxin2012/subscriptions","organizations_url":"https://api.github.com/users/qiuxin2012/orgs","repos_url":"https://api.github.com/users/qiuxin2012/repos","events_url":"https://api.github.com/users/qiuxin2012/events{/privacy}","received_events_url":"https://api.github.com/users/qiuxin2012/received_events","type":"User","site_admin":false},"repo":{"id":77880252,"node_id":"MDEwOlJlcG9zaXRvcnk3Nzg4MDI1Mg==","name":"BigDL","full_name":"qiuxin2012/BigDL","owner":{"login":"qiuxin2012","id":4495653,"node_id":"MDQ6VXNlcjQ0OTU2NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/4495653?v=4","gravatar_id":"","url":"https://api.github.com/users/qiuxin2012","html_url":"https://github.com/qiuxin2012","followers_url":"https://api.github.com/users/qiuxin2012/followers","following_url":"https://api.github.com/users/qiuxin2012/following{/other_user}","gists_url":"https://api.github.com/users/qiuxin2012/gists{/gist_id}","starred_url":"https://api.github.com/users/qiuxin2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiuxin2012/subscriptions","organizations_url":"https://api.github.com/users/qiuxin2012/orgs","repos_url":"https://api.github.com/users/qiuxin2012/repos","events_url":"https://api.github.com/users/qiuxin2012/events{/privacy}","received_events_url":"https://api.github.com/users/qiuxin2012/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/qiuxin2012/BigDL","description":"BigDL: Distributed Deep learning Library for Apache Spark","fork":true,"url":"https://api.github.com/repos/qiuxin2012/BigDL","forks_url":"https://api.github.com/repos/qiuxin2012/BigDL/forks","keys_url":"https://api.github.com/repos/qiuxin2012/BigDL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qiuxin2012/BigDL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qiuxin2012/BigDL/teams","hooks_url":"https://api.github.com/repos/qiuxin2012/BigDL/hooks","issue_events_url":"https://api.github.com/repos/qiuxin2012/BigDL/issues/events{/number}","events_url":"https://api.github.com/repos/qiuxin2012/BigDL/events","assignees_url":"https://api.github.com/repos/qiuxin2012/BigDL/assignees{/user}","branches_url":"https://api.github.com/repos/qiuxin2012/BigDL/branches{/branch}","tags_url":"https://api.github.com/repos/qiuxin2012/BigDL/tags","blobs_url":"https://api.github.com/repos/qiuxin2012/BigDL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qiuxin2012/BigDL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qiuxin2012/BigDL/git/refs{/sha}","trees_url":"https://api.github.com/repos/qiuxin2012/BigDL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qiuxin2012/BigDL/statuses/{sha}","languages_url":"https://api.github.com/repos/qiuxin2012/BigDL/languages","stargazers_url":"https://api.github.com/repos/qiuxin2012/BigDL/stargazers","contributors_url":"https://api.github.com/repos/qiuxin2012/BigDL/contributors","subscribers_url":"https://api.github.com/repos/qiuxin2012/BigDL/subscribers","subscription_url":"https://api.github.com/repos/qiuxin2012/BigDL/subscription","commits_url":"https://api.github.com/repos/qiuxin2012/BigDL/commits{/sha}","git_commits_url":"https://api.github.com/repos/qiuxin2012/BigDL/git/commits{/sha}","comments_url":"https://api.github.com/repos/qiuxin2012/BigDL/comments{/number}","issue_comment_url":"https://api.github.com/repos/qiuxin2012/BigDL/issues/comments{/number}","contents_url":"https://api.github.com/repos/qiuxin2012/BigDL/contents/{+path}","compare_url":"https://api.github.com/repos/qiuxin2012/BigDL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qiuxin2012/BigDL/merges","archive_url":"https://api.github.com/repos/qiuxin2012/BigDL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qiuxin2012/BigDL/downloads","issues_url":"https://api.github.com/repos/qiuxin2012/BigDL/issues{/number}","pulls_url":"https://api.github.com/repos/qiuxin2012/BigDL/pulls{/number}","milestones_url":"https://api.github.com/repos/qiuxin2012/BigDL/milestones{/number}","notifications_url":"https://api.github.com/repos/qiuxin2012/BigDL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qiuxin2012/BigDL/labels{/name}","releases_url":"https://api.github.com/repos/qiuxin2012/BigDL/releases{/id}","deployments_url":"https://api.github.com/repos/qiuxin2012/BigDL/deployments","created_at":"2017-01-03T03:19:12Z","updated_at":"2017-01-03T03:19:17Z","pushed_at":"2018-08-27T09:17:12Z","git_url":"git://github.com/qiuxin2012/BigDL.git","ssh_url":"git@github.com:qiuxin2012/BigDL.git","clone_url":"https://github.com/qiuxin2012/BigDL.git","svn_url":"https://github.com/qiuxin2012/BigDL","homepage":"","size":25504,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"intel-analytics:master","ref":"master","sha":"70d2a9fac9c6bc5d04683d1d910d463d0722a777","user":{"login":"intel-analytics","id":10941215,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTQxMjE1","avatar_url":"https://avatars3.githubusercontent.com/u/10941215?v=4","gravatar_id":"","url":"https://api.github.com/users/intel-analytics","html_url":"https://github.com/intel-analytics","followers_url":"https://api.github.com/users/intel-analytics/followers","following_url":"https://api.github.com/users/intel-analytics/following{/other_user}","gists_url":"https://api.github.com/users/intel-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-analytics/subscriptions","organizations_url":"https://api.github.com/users/intel-analytics/orgs","repos_url":"https://api.github.com/users/intel-analytics/repos","events_url":"https://api.github.com/users/intel-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/intel-analytics/received_events","type":"Organization","site_admin":false},"repo":{"id":66823715,"node_id":"MDEwOlJlcG9zaXRvcnk2NjgyMzcxNQ==","name":"BigDL","full_name":"intel-analytics/BigDL","owner":{"login":"intel-analytics","id":10941215,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTQxMjE1","avatar_url":"https://avatars3.githubusercontent.com/u/10941215?v=4","gravatar_id":"","url":"https://api.github.com/users/intel-analytics","html_url":"https://github.com/intel-analytics","followers_url":"https://api.github.com/users/intel-analytics/followers","following_url":"https://api.github.com/users/intel-analytics/following{/other_user}","gists_url":"https://api.github.com/users/intel-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-analytics/subscriptions","organizations_url":"https://api.github.com/users/intel-analytics/orgs","repos_url":"https://api.github.com/users/intel-analytics/repos","events_url":"https://api.github.com/users/intel-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/intel-analytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intel-analytics/BigDL","description":"BigDL: Distributed Deep Learning Library for Apache Spark","fork":false,"url":"https://api.github.com/repos/intel-analytics/BigDL","forks_url":"https://api.github.com/repos/intel-analytics/BigDL/forks","keys_url":"https://api.github.com/repos/intel-analytics/BigDL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intel-analytics/BigDL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intel-analytics/BigDL/teams","hooks_url":"https://api.github.com/repos/intel-analytics/BigDL/hooks","issue_events_url":"https://api.github.com/repos/intel-analytics/BigDL/issues/events{/number}","events_url":"https://api.github.com/repos/intel-analytics/BigDL/events","assignees_url":"https://api.github.com/repos/intel-analytics/BigDL/assignees{/user}","branches_url":"https://api.github.com/repos/intel-analytics/BigDL/branches{/branch}","tags_url":"https://api.github.com/repos/intel-analytics/BigDL/tags","blobs_url":"https://api.github.com/repos/intel-analytics/BigDL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intel-analytics/BigDL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intel-analytics/BigDL/git/refs{/sha}","trees_url":"https://api.github.com/repos/intel-analytics/BigDL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intel-analytics/BigDL/statuses/{sha}","languages_url":"https://api.github.com/repos/intel-analytics/BigDL/languages","stargazers_url":"https://api.github.com/repos/intel-analytics/BigDL/stargazers","contributors_url":"https://api.github.com/repos/intel-analytics/BigDL/contributors","subscribers_url":"https://api.github.com/repos/intel-analytics/BigDL/subscribers","subscription_url":"https://api.github.com/repos/intel-analytics/BigDL/subscription","commits_url":"https://api.github.com/repos/intel-analytics/BigDL/commits{/sha}","git_commits_url":"https://api.github.com/repos/intel-analytics/BigDL/git/commits{/sha}","comments_url":"https://api.github.com/repos/intel-analytics/BigDL/comments{/number}","issue_comment_url":"https://api.github.com/repos/intel-analytics/BigDL/issues/comments{/number}","contents_url":"https://api.github.com/repos/intel-analytics/BigDL/contents/{+path}","compare_url":"https://api.github.com/repos/intel-analytics/BigDL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intel-analytics/BigDL/merges","archive_url":"https://api.github.com/repos/intel-analytics/BigDL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intel-analytics/BigDL/downloads","issues_url":"https://api.github.com/repos/intel-analytics/BigDL/issues{/number}","pulls_url":"https://api.github.com/repos/intel-analytics/BigDL/pulls{/number}","milestones_url":"https://api.github.com/repos/intel-analytics/BigDL/milestones{/number}","notifications_url":"https://api.github.com/repos/intel-analytics/BigDL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intel-analytics/BigDL/labels{/name}","releases_url":"https://api.github.com/repos/intel-analytics/BigDL/releases{/id}","deployments_url":"https://api.github.com/repos/intel-analytics/BigDL/deployments","created_at":"2016-08-29T07:59:50Z","updated_at":"2018-08-27T10:57:06Z","pushed_at":"2018-08-28T05:46:01Z","git_url":"git://github.com/intel-analytics/BigDL.git","ssh_url":"git@github.com:intel-analytics/BigDL.git","clone_url":"https://github.com/intel-analytics/BigDL.git","svn_url":"https://github.com/intel-analytics/BigDL","homepage":"https://bigdl-project.github.io/","size":22278,"stargazers_count":2603,"watchers_count":2603,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":601,"mirror_url":null,"archived":false,"open_issues_count":134,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":601,"open_issues":134,"watchers":2603,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/2623"},"html":{"href":"https://github.com/intel-analytics/BigDL/pull/2623"},"issue":{"href":"https://api.github.com/repos/intel-analytics/BigDL/issues/2623"},"comments":{"href":"https://api.github.com/repos/intel-analytics/BigDL/issues/2623/comments"},"review_comments":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/2623/comments"},"review_comment":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intel-analytics/BigDL/pulls/2623/commits"},"statuses":{"href":"https://api.github.com/repos/intel-analytics/BigDL/statuses/863b4b1031c6ca5976767163798d50ee446978f9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yiheng"}}