{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/keystone/pulls/comments/56734494","id":56734494,"diff_hunk":"@@ -0,0 +1,343 @@\n+package nodes.learning\n+\n+import workflow.LabelEstimator\n+\n+import breeze.linalg._\n+import breeze.math._\n+import breeze.numerics._\n+import org.apache.spark.rdd.RDD\n+import org.apache.spark.broadcast.Broadcast\n+import org.apache.spark.SparkConf\n+import org.apache.spark.SparkContext\n+import org.apache.spark.SparkContext._\n+import utils._\n+\n+\n+import edu.berkeley.cs.amplab.mlmatrix.RowPartitionedMatrix\n+import edu.berkeley.cs.amplab.mlmatrix.util.{Utils => MLMatrixUtils}\n+\n+import scala.util.Random\n+\n+class KernelRidgeRegression(\n+  kernelBlockGenerator: KernelGenerator,","path":"src/main/scala/nodes/learning/KernelRidgeRegression.scala","position":22,"original_position":22,"commit_id":"7033189d415b60feaf2e0f9a66cc44b9d716a6cc","original_commit_id":"7033189d415b60feaf2e0f9a66cc44b9d716a6cc","user":{"login":"Vaishaal","id":1361040,"avatar_url":"https://avatars.githubusercontent.com/u/1361040?v=3","gravatar_id":"","url":"https://api.github.com/users/Vaishaal","html_url":"https://github.com/Vaishaal","followers_url":"https://api.github.com/users/Vaishaal/followers","following_url":"https://api.github.com/users/Vaishaal/following{/other_user}","gists_url":"https://api.github.com/users/Vaishaal/gists{/gist_id}","starred_url":"https://api.github.com/users/Vaishaal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vaishaal/subscriptions","organizations_url":"https://api.github.com/users/Vaishaal/orgs","repos_url":"https://api.github.com/users/Vaishaal/repos","events_url":"https://api.github.com/users/Vaishaal/events{/privacy}","received_events_url":"https://api.github.com/users/Vaishaal/received_events","type":"User","site_admin":false},"body":"Morally/mathematically its the same thing since if you minimize ||Ax - b|| for a PD A, you will recover A^{-1}b. Just implementation wise, since we know the kernel is PD we want to do the linear system solve. Am I right @shivaram?\r\n\r\n","created_at":"2016-03-18T23:07:15Z","updated_at":"2016-03-18T23:07:15Z","html_url":"https://github.com/amplab/keystone/pull/234#discussion_r56734494","pull_request_url":"https://api.github.com/repos/amplab/keystone/pulls/234","_links":{"self":{"href":"https://api.github.com/repos/amplab/keystone/pulls/comments/56734494"},"html":{"href":"https://github.com/amplab/keystone/pull/234#discussion_r56734494"},"pull_request":{"href":"https://api.github.com/repos/amplab/keystone/pulls/234"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/keystone/pulls/234","id":61821341,"html_url":"https://github.com/amplab/keystone/pull/234","diff_url":"https://github.com/amplab/keystone/pull/234.diff","patch_url":"https://github.com/amplab/keystone/pull/234.patch","issue_url":"https://api.github.com/repos/amplab/keystone/issues/234","number":234,"state":"open","locked":false,"title":"Kernel solver","user":{"login":"Vaishaal","id":1361040,"avatar_url":"https://avatars.githubusercontent.com/u/1361040?v=3","gravatar_id":"","url":"https://api.github.com/users/Vaishaal","html_url":"https://github.com/Vaishaal","followers_url":"https://api.github.com/users/Vaishaal/followers","following_url":"https://api.github.com/users/Vaishaal/following{/other_user}","gists_url":"https://api.github.com/users/Vaishaal/gists{/gist_id}","starred_url":"https://api.github.com/users/Vaishaal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vaishaal/subscriptions","organizations_url":"https://api.github.com/users/Vaishaal/orgs","repos_url":"https://api.github.com/users/Vaishaal/repos","events_url":"https://api.github.com/users/Vaishaal/events{/privacy}","received_events_url":"https://api.github.com/users/Vaishaal/received_events","type":"User","site_admin":false},"body":"@shivaram let me know if this looks correct. I'm storing the full model in memory and broadcasting, do you know of a more effective way to do this.","created_at":"2016-03-05T19:26:41Z","updated_at":"2016-03-18T23:07:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58e5d21218b18124545fe7ca480a14fe68bde5f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/keystone/pulls/234/commits","review_comments_url":"https://api.github.com/repos/amplab/keystone/pulls/234/comments","review_comment_url":"https://api.github.com/repos/amplab/keystone/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/keystone/issues/234/comments","statuses_url":"https://api.github.com/repos/amplab/keystone/statuses/7033189d415b60feaf2e0f9a66cc44b9d716a6cc","head":{"label":"amplab:kernelSolver","ref":"kernelSolver","sha":"7033189d415b60feaf2e0f9a66cc44b9d716a6cc","user":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"repo":{"id":33748726,"name":"keystone","full_name":"amplab/keystone","owner":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplab/keystone","description":"Simplifying robust end-to-end machine learning on Apache Spark.","fork":false,"url":"https://api.github.com/repos/amplab/keystone","forks_url":"https://api.github.com/repos/amplab/keystone/forks","keys_url":"https://api.github.com/repos/amplab/keystone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplab/keystone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplab/keystone/teams","hooks_url":"https://api.github.com/repos/amplab/keystone/hooks","issue_events_url":"https://api.github.com/repos/amplab/keystone/issues/events{/number}","events_url":"https://api.github.com/repos/amplab/keystone/events","assignees_url":"https://api.github.com/repos/amplab/keystone/assignees{/user}","branches_url":"https://api.github.com/repos/amplab/keystone/branches{/branch}","tags_url":"https://api.github.com/repos/amplab/keystone/tags","blobs_url":"https://api.github.com/repos/amplab/keystone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplab/keystone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplab/keystone/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplab/keystone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplab/keystone/statuses/{sha}","languages_url":"https://api.github.com/repos/amplab/keystone/languages","stargazers_url":"https://api.github.com/repos/amplab/keystone/stargazers","contributors_url":"https://api.github.com/repos/amplab/keystone/contributors","subscribers_url":"https://api.github.com/repos/amplab/keystone/subscribers","subscription_url":"https://api.github.com/repos/amplab/keystone/subscription","commits_url":"https://api.github.com/repos/amplab/keystone/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplab/keystone/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplab/keystone/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplab/keystone/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplab/keystone/contents/{+path}","compare_url":"https://api.github.com/repos/amplab/keystone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplab/keystone/merges","archive_url":"https://api.github.com/repos/amplab/keystone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplab/keystone/downloads","issues_url":"https://api.github.com/repos/amplab/keystone/issues{/number}","pulls_url":"https://api.github.com/repos/amplab/keystone/pulls{/number}","milestones_url":"https://api.github.com/repos/amplab/keystone/milestones{/number}","notifications_url":"https://api.github.com/repos/amplab/keystone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplab/keystone/labels{/name}","releases_url":"https://api.github.com/repos/amplab/keystone/releases{/id}","deployments_url":"https://api.github.com/repos/amplab/keystone/deployments","created_at":"2015-04-10T20:16:11Z","updated_at":"2016-03-17T14:11:20Z","pushed_at":"2016-03-18T21:53:49Z","git_url":"git://github.com/amplab/keystone.git","ssh_url":"git@github.com:amplab/keystone.git","clone_url":"https://github.com/amplab/keystone.git","svn_url":"https://github.com/amplab/keystone","homepage":"http://keystone-ml.org/","size":17823,"stargazers_count":297,"watchers_count":297,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":49,"forks":63,"open_issues":49,"watchers":297,"default_branch":"master"}},"base":{"label":"amplab:master","ref":"master","sha":"4e16c5f523cd56a842c28a541655c9cb40ad9482","user":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"repo":{"id":33748726,"name":"keystone","full_name":"amplab/keystone","owner":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplab/keystone","description":"Simplifying robust end-to-end machine learning on Apache Spark.","fork":false,"url":"https://api.github.com/repos/amplab/keystone","forks_url":"https://api.github.com/repos/amplab/keystone/forks","keys_url":"https://api.github.com/repos/amplab/keystone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplab/keystone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplab/keystone/teams","hooks_url":"https://api.github.com/repos/amplab/keystone/hooks","issue_events_url":"https://api.github.com/repos/amplab/keystone/issues/events{/number}","events_url":"https://api.github.com/repos/amplab/keystone/events","assignees_url":"https://api.github.com/repos/amplab/keystone/assignees{/user}","branches_url":"https://api.github.com/repos/amplab/keystone/branches{/branch}","tags_url":"https://api.github.com/repos/amplab/keystone/tags","blobs_url":"https://api.github.com/repos/amplab/keystone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplab/keystone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplab/keystone/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplab/keystone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplab/keystone/statuses/{sha}","languages_url":"https://api.github.com/repos/amplab/keystone/languages","stargazers_url":"https://api.github.com/repos/amplab/keystone/stargazers","contributors_url":"https://api.github.com/repos/amplab/keystone/contributors","subscribers_url":"https://api.github.com/repos/amplab/keystone/subscribers","subscription_url":"https://api.github.com/repos/amplab/keystone/subscription","commits_url":"https://api.github.com/repos/amplab/keystone/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplab/keystone/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplab/keystone/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplab/keystone/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplab/keystone/contents/{+path}","compare_url":"https://api.github.com/repos/amplab/keystone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplab/keystone/merges","archive_url":"https://api.github.com/repos/amplab/keystone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplab/keystone/downloads","issues_url":"https://api.github.com/repos/amplab/keystone/issues{/number}","pulls_url":"https://api.github.com/repos/amplab/keystone/pulls{/number}","milestones_url":"https://api.github.com/repos/amplab/keystone/milestones{/number}","notifications_url":"https://api.github.com/repos/amplab/keystone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplab/keystone/labels{/name}","releases_url":"https://api.github.com/repos/amplab/keystone/releases{/id}","deployments_url":"https://api.github.com/repos/amplab/keystone/deployments","created_at":"2015-04-10T20:16:11Z","updated_at":"2016-03-17T14:11:20Z","pushed_at":"2016-03-18T21:53:49Z","git_url":"git://github.com/amplab/keystone.git","ssh_url":"git@github.com:amplab/keystone.git","clone_url":"https://github.com/amplab/keystone.git","svn_url":"https://github.com/amplab/keystone","homepage":"http://keystone-ml.org/","size":17823,"stargazers_count":297,"watchers_count":297,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":49,"forks":63,"open_issues":49,"watchers":297,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/keystone/pulls/234"},"html":{"href":"https://github.com/amplab/keystone/pull/234"},"issue":{"href":"https://api.github.com/repos/amplab/keystone/issues/234"},"comments":{"href":"https://api.github.com/repos/amplab/keystone/issues/234/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/keystone/pulls/234/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/keystone/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/keystone/pulls/234/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/keystone/statuses/7033189d415b60feaf2e0f9a66cc44b9d716a6cc"}}}}