{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/photon-ml/pulls/comments/135323554","pull_request_review_id":58728812,"id":135323554,"diff_hunk":"@@ -206,4 +206,22 @@ object VectorUtils {\n     v1.length == v2.length && v1.toArray.zip(v2.toArray).forall { case (m1, m2) =>\n       MathUtils.isAlmostZero(m2 - m1)\n     }\n+\n+  /**\n+   * Returns the indices for non-zero elements of the vector\n+   *\n+   * @param vector the input vector\n+   * @return the set of indices\n+   */\n+  def getActiveIndices(vector: Vector[Double]): Set[Int] = vector match {\n+    case vector: DenseVector[Double] => vector","path":"photon-lib/src/main/scala/com/linkedin/photon/ml/util/VectorUtils.scala","position":12,"original_position":12,"commit_id":"da4ec8946962a0f2154ace33cc264816811b009c","original_commit_id":"da4ec8946962a0f2154ace33cc264816811b009c","user":{"login":"joshvfleming","id":212140,"avatar_url":"https://avatars2.githubusercontent.com/u/212140?v=4","gravatar_id":"","url":"https://api.github.com/users/joshvfleming","html_url":"https://github.com/joshvfleming","followers_url":"https://api.github.com/users/joshvfleming/followers","following_url":"https://api.github.com/users/joshvfleming/following{/other_user}","gists_url":"https://api.github.com/users/joshvfleming/gists{/gist_id}","starred_url":"https://api.github.com/users/joshvfleming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshvfleming/subscriptions","organizations_url":"https://api.github.com/users/joshvfleming/orgs","repos_url":"https://api.github.com/users/joshvfleming/repos","events_url":"https://api.github.com/users/joshvfleming/events{/privacy}","received_events_url":"https://api.github.com/users/joshvfleming/received_events","type":"User","site_admin":false},"body":"Ah, good point. Will fix.","created_at":"2017-08-25T18:23:57Z","updated_at":"2017-08-25T18:23:57Z","html_url":"https://github.com/linkedin/photon-ml/pull/298#discussion_r135323554","pull_request_url":"https://api.github.com/repos/linkedin/photon-ml/pulls/298","_links":{"self":{"href":"https://api.github.com/repos/linkedin/photon-ml/pulls/comments/135323554"},"html":{"href":"https://github.com/linkedin/photon-ml/pull/298#discussion_r135323554"},"pull_request":{"href":"https://api.github.com/repos/linkedin/photon-ml/pulls/298"}},"in_reply_to_id":135300505},"pull_request":{"url":"https://api.github.com/repos/linkedin/photon-ml/pulls/298","id":137688320,"html_url":"https://github.com/linkedin/photon-ml/pull/298","diff_url":"https://github.com/linkedin/photon-ml/pull/298.diff","patch_url":"https://github.com/linkedin/photon-ml/pull/298.patch","issue_url":"https://api.github.com/repos/linkedin/photon-ml/issues/298","number":298,"state":"open","locked":false,"title":"Fix issue where IndexMapProjector produces nondeterministic results","user":{"login":"joshvfleming","id":212140,"avatar_url":"https://avatars2.githubusercontent.com/u/212140?v=4","gravatar_id":"","url":"https://api.github.com/users/joshvfleming","html_url":"https://github.com/joshvfleming","followers_url":"https://api.github.com/users/joshvfleming/followers","following_url":"https://api.github.com/users/joshvfleming/following{/other_user}","gists_url":"https://api.github.com/users/joshvfleming/gists{/gist_id}","starred_url":"https://api.github.com/users/joshvfleming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshvfleming/subscriptions","organizations_url":"https://api.github.com/users/joshvfleming/orgs","repos_url":"https://api.github.com/users/joshvfleming/repos","events_url":"https://api.github.com/users/joshvfleming/events{/privacy}","received_events_url":"https://api.github.com/users/joshvfleming/received_events","type":"User","site_admin":false},"body":"Previously we were scanning only the active data to determine the nonzero indices of a RE dataset. This can produce nondeterministic results when we recompute and resample the active data, because the dimensionality of the feature vectors can change and get out of sync with the model.\r\n\r\nThe fix is to scan both active and passive data to determine the feature projection.","created_at":"2017-08-25T14:39:33Z","updated_at":"2017-08-25T18:23:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd6ce695f84e9c03fa30eee4b705fadc54a9b738","assignee":{"login":"fastier-li","id":25206284,"avatar_url":"https://avatars3.githubusercontent.com/u/25206284?v=4","gravatar_id":"","url":"https://api.github.com/users/fastier-li","html_url":"https://github.com/fastier-li","followers_url":"https://api.github.com/users/fastier-li/followers","following_url":"https://api.github.com/users/fastier-li/following{/other_user}","gists_url":"https://api.github.com/users/fastier-li/gists{/gist_id}","starred_url":"https://api.github.com/users/fastier-li/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastier-li/subscriptions","organizations_url":"https://api.github.com/users/fastier-li/orgs","repos_url":"https://api.github.com/users/fastier-li/repos","events_url":"https://api.github.com/users/fastier-li/events{/privacy}","received_events_url":"https://api.github.com/users/fastier-li/received_events","type":"User","site_admin":false},"assignees":[{"login":"fastier-li","id":25206284,"avatar_url":"https://avatars3.githubusercontent.com/u/25206284?v=4","gravatar_id":"","url":"https://api.github.com/users/fastier-li","html_url":"https://github.com/fastier-li","followers_url":"https://api.github.com/users/fastier-li/followers","following_url":"https://api.github.com/users/fastier-li/following{/other_user}","gists_url":"https://api.github.com/users/fastier-li/gists{/gist_id}","starred_url":"https://api.github.com/users/fastier-li/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastier-li/subscriptions","organizations_url":"https://api.github.com/users/fastier-li/orgs","repos_url":"https://api.github.com/users/fastier-li/repos","events_url":"https://api.github.com/users/fastier-li/events{/privacy}","received_events_url":"https://api.github.com/users/fastier-li/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/photon-ml/pulls/298/commits","review_comments_url":"https://api.github.com/repos/linkedin/photon-ml/pulls/298/comments","review_comment_url":"https://api.github.com/repos/linkedin/photon-ml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/photon-ml/issues/298/comments","statuses_url":"https://api.github.com/repos/linkedin/photon-ml/statuses/da4ec8946962a0f2154ace33cc264816811b009c","head":{"label":"joshvfleming:master","ref":"master","sha":"da4ec8946962a0f2154ace33cc264816811b009c","user":{"login":"joshvfleming","id":212140,"avatar_url":"https://avatars2.githubusercontent.com/u/212140?v=4","gravatar_id":"","url":"https://api.github.com/users/joshvfleming","html_url":"https://github.com/joshvfleming","followers_url":"https://api.github.com/users/joshvfleming/followers","following_url":"https://api.github.com/users/joshvfleming/following{/other_user}","gists_url":"https://api.github.com/users/joshvfleming/gists{/gist_id}","starred_url":"https://api.github.com/users/joshvfleming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshvfleming/subscriptions","organizations_url":"https://api.github.com/users/joshvfleming/orgs","repos_url":"https://api.github.com/users/joshvfleming/repos","events_url":"https://api.github.com/users/joshvfleming/events{/privacy}","received_events_url":"https://api.github.com/users/joshvfleming/received_events","type":"User","site_admin":false},"repo":{"id":56254851,"name":"photon-ml","full_name":"joshvfleming/photon-ml","owner":{"login":"joshvfleming","id":212140,"avatar_url":"https://avatars2.githubusercontent.com/u/212140?v=4","gravatar_id":"","url":"https://api.github.com/users/joshvfleming","html_url":"https://github.com/joshvfleming","followers_url":"https://api.github.com/users/joshvfleming/followers","following_url":"https://api.github.com/users/joshvfleming/following{/other_user}","gists_url":"https://api.github.com/users/joshvfleming/gists{/gist_id}","starred_url":"https://api.github.com/users/joshvfleming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshvfleming/subscriptions","organizations_url":"https://api.github.com/users/joshvfleming/orgs","repos_url":"https://api.github.com/users/joshvfleming/repos","events_url":"https://api.github.com/users/joshvfleming/events{/privacy}","received_events_url":"https://api.github.com/users/joshvfleming/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshvfleming/photon-ml","description":"A scalable machine learning library on Apache Spark","fork":true,"url":"https://api.github.com/repos/joshvfleming/photon-ml","forks_url":"https://api.github.com/repos/joshvfleming/photon-ml/forks","keys_url":"https://api.github.com/repos/joshvfleming/photon-ml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshvfleming/photon-ml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshvfleming/photon-ml/teams","hooks_url":"https://api.github.com/repos/joshvfleming/photon-ml/hooks","issue_events_url":"https://api.github.com/repos/joshvfleming/photon-ml/issues/events{/number}","events_url":"https://api.github.com/repos/joshvfleming/photon-ml/events","assignees_url":"https://api.github.com/repos/joshvfleming/photon-ml/assignees{/user}","branches_url":"https://api.github.com/repos/joshvfleming/photon-ml/branches{/branch}","tags_url":"https://api.github.com/repos/joshvfleming/photon-ml/tags","blobs_url":"https://api.github.com/repos/joshvfleming/photon-ml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshvfleming/photon-ml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshvfleming/photon-ml/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshvfleming/photon-ml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshvfleming/photon-ml/statuses/{sha}","languages_url":"https://api.github.com/repos/joshvfleming/photon-ml/languages","stargazers_url":"https://api.github.com/repos/joshvfleming/photon-ml/stargazers","contributors_url":"https://api.github.com/repos/joshvfleming/photon-ml/contributors","subscribers_url":"https://api.github.com/repos/joshvfleming/photon-ml/subscribers","subscription_url":"https://api.github.com/repos/joshvfleming/photon-ml/subscription","commits_url":"https://api.github.com/repos/joshvfleming/photon-ml/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshvfleming/photon-ml/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshvfleming/photon-ml/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshvfleming/photon-ml/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshvfleming/photon-ml/contents/{+path}","compare_url":"https://api.github.com/repos/joshvfleming/photon-ml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshvfleming/photon-ml/merges","archive_url":"https://api.github.com/repos/joshvfleming/photon-ml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshvfleming/photon-ml/downloads","issues_url":"https://api.github.com/repos/joshvfleming/photon-ml/issues{/number}","pulls_url":"https://api.github.com/repos/joshvfleming/photon-ml/pulls{/number}","milestones_url":"https://api.github.com/repos/joshvfleming/photon-ml/milestones{/number}","notifications_url":"https://api.github.com/repos/joshvfleming/photon-ml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshvfleming/photon-ml/labels{/name}","releases_url":"https://api.github.com/repos/joshvfleming/photon-ml/releases{/id}","deployments_url":"https://api.github.com/repos/joshvfleming/photon-ml/deployments","created_at":"2016-04-14T16:55:25Z","updated_at":"2017-03-17T20:48:27Z","pushed_at":"2017-08-25T14:37:57Z","git_url":"git://github.com/joshvfleming/photon-ml.git","ssh_url":"git@github.com:joshvfleming/photon-ml.git","clone_url":"https://github.com/joshvfleming/photon-ml.git","svn_url":"https://github.com/joshvfleming/photon-ml","homepage":"","size":62147,"stargazers_count":0,"watchers_count":0,"language":"Terra","has_issues":false,"has_projects":true,"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":"linkedin:master","ref":"master","sha":"50e7a165473b9d3fd1e2a070c81ad92518bf0919","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars3.githubusercontent.com/u/357098?v=4","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":50964104,"name":"photon-ml","full_name":"linkedin/photon-ml","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars3.githubusercontent.com/u/357098?v=4","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/photon-ml","description":"A scalable machine learning library on Apache Spark","fork":false,"url":"https://api.github.com/repos/linkedin/photon-ml","forks_url":"https://api.github.com/repos/linkedin/photon-ml/forks","keys_url":"https://api.github.com/repos/linkedin/photon-ml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/photon-ml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/photon-ml/teams","hooks_url":"https://api.github.com/repos/linkedin/photon-ml/hooks","issue_events_url":"https://api.github.com/repos/linkedin/photon-ml/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/photon-ml/events","assignees_url":"https://api.github.com/repos/linkedin/photon-ml/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/photon-ml/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/photon-ml/tags","blobs_url":"https://api.github.com/repos/linkedin/photon-ml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/photon-ml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/photon-ml/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/photon-ml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/photon-ml/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/photon-ml/languages","stargazers_url":"https://api.github.com/repos/linkedin/photon-ml/stargazers","contributors_url":"https://api.github.com/repos/linkedin/photon-ml/contributors","subscribers_url":"https://api.github.com/repos/linkedin/photon-ml/subscribers","subscription_url":"https://api.github.com/repos/linkedin/photon-ml/subscription","commits_url":"https://api.github.com/repos/linkedin/photon-ml/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/photon-ml/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/photon-ml/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/photon-ml/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/photon-ml/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/photon-ml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/photon-ml/merges","archive_url":"https://api.github.com/repos/linkedin/photon-ml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/photon-ml/downloads","issues_url":"https://api.github.com/repos/linkedin/photon-ml/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/photon-ml/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/photon-ml/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/photon-ml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/photon-ml/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/photon-ml/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/photon-ml/deployments","created_at":"2016-02-03T01:12:07Z","updated_at":"2017-08-23T15:41:18Z","pushed_at":"2017-08-25T14:39:34Z","git_url":"git://github.com/linkedin/photon-ml.git","ssh_url":"git@github.com:linkedin/photon-ml.git","clone_url":"https://github.com/linkedin/photon-ml.git","svn_url":"https://github.com/linkedin/photon-ml","homepage":"","size":62226,"stargazers_count":461,"watchers_count":461,"language":"Terra","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":116,"mirror_url":null,"open_issues_count":26,"forks":116,"open_issues":26,"watchers":461,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/photon-ml/pulls/298"},"html":{"href":"https://github.com/linkedin/photon-ml/pull/298"},"issue":{"href":"https://api.github.com/repos/linkedin/photon-ml/issues/298"},"comments":{"href":"https://api.github.com/repos/linkedin/photon-ml/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/photon-ml/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/photon-ml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/photon-ml/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/photon-ml/statuses/da4ec8946962a0f2154ace33cc264816811b009c"}}}}
{"actor":{"display_login":"joshvfleming"}}