{"action":"created","comment":{"url":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/comments/229755330","pull_request_review_id":170329666,"id":229755330,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTc1NTMzMA==","diff_hunk":"@@ -39,8 +40,37 @@ import org.apache.spark.ml.linalg._\n  */\n class OPVector(val value: Vector) extends OPCollection {\n   type Value = Vector\n+\n   final def isEmpty: Boolean = value.size == 0\n+\n+  /**\n+   * Add vectors\n+   *\n+   * @param that another vector\n+   * @throws IllegalArgumentException if the vectors have different sizes\n+   * @return vector addition\n+   */\n+  def +(that: OPVector): OPVector = (value + that.value).toOPVector\n+\n+  /**\n+   * Subtract vectors\n+   *\n+   * @param that another vector\n+   * @throws IllegalArgumentException if the vectors have different sizes\n+   * @return vector subtraction\n+   */\n+  def -(that: OPVector): OPVector = (value - that.value).toOPVector","path":"features/src/main/scala/com/salesforce/op/features/types/OPVector.scala","position":31,"original_position":31,"commit_id":"d23029f3c1da56fd67566e0a8ba461d68b4a2801","original_commit_id":"d23029f3c1da56fd67566e0a8ba461d68b4a2801","user":{"login":"leahmcguire","id":9258550,"node_id":"MDQ6VXNlcjkyNTg1NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/9258550?v=4","gravatar_id":"","url":"https://api.github.com/users/leahmcguire","html_url":"https://github.com/leahmcguire","followers_url":"https://api.github.com/users/leahmcguire/followers","following_url":"https://api.github.com/users/leahmcguire/following{/other_user}","gists_url":"https://api.github.com/users/leahmcguire/gists{/gist_id}","starred_url":"https://api.github.com/users/leahmcguire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leahmcguire/subscriptions","organizations_url":"https://api.github.com/users/leahmcguire/orgs","repos_url":"https://api.github.com/users/leahmcguire/repos","events_url":"https://api.github.com/users/leahmcguire/events{/privacy}","received_events_url":"https://api.github.com/users/leahmcguire/received_events","type":"User","site_admin":false},"body":"as long as you are adding addition and subtraction why not dot product and cross product?","created_at":"2018-10-31T15:51:39Z","updated_at":"2018-10-31T15:51:39Z","html_url":"https://github.com/salesforce/TransmogrifAI/pull/168#discussion_r229755330","pull_request_url":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/168","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/comments/229755330"},"html":{"href":"https://github.com/salesforce/TransmogrifAI/pull/168#discussion_r229755330"},"pull_request":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/168"}}},"pull_request":{"url":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/168","id":226269362,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MjY5MzYy","html_url":"https://github.com/salesforce/TransmogrifAI/pull/168","diff_url":"https://github.com/salesforce/TransmogrifAI/pull/168.diff","patch_url":"https://github.com/salesforce/TransmogrifAI/pull/168.patch","issue_url":"https://api.github.com/repos/salesforce/TransmogrifAI/issues/168","number":168,"state":"open","locked":false,"title":"Improve test coverage for VectorsCombiner and make vector aggregator efficient ","user":{"login":"tovbinm","id":629845,"node_id":"MDQ6VXNlcjYyOTg0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/629845?v=4","gravatar_id":"","url":"https://api.github.com/users/tovbinm","html_url":"https://github.com/tovbinm","followers_url":"https://api.github.com/users/tovbinm/followers","following_url":"https://api.github.com/users/tovbinm/following{/other_user}","gists_url":"https://api.github.com/users/tovbinm/gists{/gist_id}","starred_url":"https://api.github.com/users/tovbinm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tovbinm/subscriptions","organizations_url":"https://api.github.com/users/tovbinm/orgs","repos_url":"https://api.github.com/users/tovbinm/repos","events_url":"https://api.github.com/users/tovbinm/events{/privacy}","received_events_url":"https://api.github.com/users/tovbinm/received_events","type":"User","site_admin":false},"body":"**Related issues**\r\n1. `UnionVector` monoid aggregator is not efficient for sparse vectors.\r\n2. `VectorsCombiner` stage has incomplete functional test coverage.\r\n\r\n**Describe the proposed solution**\r\n1. Moved `VectorsCombiner.combine` method to `RichVector` object\r\n2. Added `OpEstimatorSpec` base class to `VectorsCombinerTest` to improve the functional test coverage\r\n3. Added `+`, `-`, `combine` methods to `OPVector` + test `OPVectorTest`\r\n4. Added `combine` method to `RichVector` + tests\r\n5. Renamed `UnionVector` monoid aggregator to `CombineVector` and made use of `RichVector.combine` at reduve\r\n6. Bonus: added `SumVector` monoid aggregator\r\n\r\n**Describe alternatives you've considered**\r\nI could relocate `VectorsCombiner.combine` as-is to `utils` subproject, but it felt valuable enough to add `+`, `-` and `combine` to `OPVector` as well.\r\n","created_at":"2018-10-27T04:47:53Z","updated_at":"2018-10-31T15:51:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a59cb76484515128c3faa8300342e9d66ab23ef7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"marcovivero","id":8545381,"node_id":"MDQ6VXNlcjg1NDUzODE=","avatar_url":"https://avatars2.githubusercontent.com/u/8545381?v=4","gravatar_id":"","url":"https://api.github.com/users/marcovivero","html_url":"https://github.com/marcovivero","followers_url":"https://api.github.com/users/marcovivero/followers","following_url":"https://api.github.com/users/marcovivero/following{/other_user}","gists_url":"https://api.github.com/users/marcovivero/gists{/gist_id}","starred_url":"https://api.github.com/users/marcovivero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcovivero/subscriptions","organizations_url":"https://api.github.com/users/marcovivero/orgs","repos_url":"https://api.github.com/users/marcovivero/repos","events_url":"https://api.github.com/users/marcovivero/events{/privacy}","received_events_url":"https://api.github.com/users/marcovivero/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1016857320,"node_id":"MDU6TGFiZWwxMDE2ODU3MzIw","url":"https://api.github.com/repos/salesforce/TransmogrifAI/labels/ready%20for%20review","name":"ready for review","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/168/commits","review_comments_url":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/168/comments","review_comment_url":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/salesforce/TransmogrifAI/issues/168/comments","statuses_url":"https://api.github.com/repos/salesforce/TransmogrifAI/statuses/d23029f3c1da56fd67566e0a8ba461d68b4a2801","head":{"label":"salesforce:mt/vectors-combiner","ref":"mt/vectors-combiner","sha":"d23029f3c1da56fd67566e0a8ba461d68b4a2801","user":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":109289451,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkyODk0NTE=","name":"TransmogrifAI","full_name":"salesforce/TransmogrifAI","private":false,"owner":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/salesforce/TransmogrifAI","description":"TransmogrifAI (pronounced trăns-mŏgˈrə-fī) is an AutoML library for building modular, reusable, strongly typed machine learning workflows on Spark with minimal hand tuning","fork":false,"url":"https://api.github.com/repos/salesforce/TransmogrifAI","forks_url":"https://api.github.com/repos/salesforce/TransmogrifAI/forks","keys_url":"https://api.github.com/repos/salesforce/TransmogrifAI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salesforce/TransmogrifAI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salesforce/TransmogrifAI/teams","hooks_url":"https://api.github.com/repos/salesforce/TransmogrifAI/hooks","issue_events_url":"https://api.github.com/repos/salesforce/TransmogrifAI/issues/events{/number}","events_url":"https://api.github.com/repos/salesforce/TransmogrifAI/events","assignees_url":"https://api.github.com/repos/salesforce/TransmogrifAI/assignees{/user}","branches_url":"https://api.github.com/repos/salesforce/TransmogrifAI/branches{/branch}","tags_url":"https://api.github.com/repos/salesforce/TransmogrifAI/tags","blobs_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/refs{/sha}","trees_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salesforce/TransmogrifAI/statuses/{sha}","languages_url":"https://api.github.com/repos/salesforce/TransmogrifAI/languages","stargazers_url":"https://api.github.com/repos/salesforce/TransmogrifAI/stargazers","contributors_url":"https://api.github.com/repos/salesforce/TransmogrifAI/contributors","subscribers_url":"https://api.github.com/repos/salesforce/TransmogrifAI/subscribers","subscription_url":"https://api.github.com/repos/salesforce/TransmogrifAI/subscription","commits_url":"https://api.github.com/repos/salesforce/TransmogrifAI/commits{/sha}","git_commits_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/commits{/sha}","comments_url":"https://api.github.com/repos/salesforce/TransmogrifAI/comments{/number}","issue_comment_url":"https://api.github.com/repos/salesforce/TransmogrifAI/issues/comments{/number}","contents_url":"https://api.github.com/repos/salesforce/TransmogrifAI/contents/{+path}","compare_url":"https://api.github.com/repos/salesforce/TransmogrifAI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salesforce/TransmogrifAI/merges","archive_url":"https://api.github.com/repos/salesforce/TransmogrifAI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salesforce/TransmogrifAI/downloads","issues_url":"https://api.github.com/repos/salesforce/TransmogrifAI/issues{/number}","pulls_url":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls{/number}","milestones_url":"https://api.github.com/repos/salesforce/TransmogrifAI/milestones{/number}","notifications_url":"https://api.github.com/repos/salesforce/TransmogrifAI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salesforce/TransmogrifAI/labels{/name}","releases_url":"https://api.github.com/repos/salesforce/TransmogrifAI/releases{/id}","deployments_url":"https://api.github.com/repos/salesforce/TransmogrifAI/deployments","created_at":"2017-11-02T16:15:15Z","updated_at":"2018-10-30T20:57:04Z","pushed_at":"2018-10-31T07:25:40Z","git_url":"git://github.com/salesforce/TransmogrifAI.git","ssh_url":"git@github.com:salesforce/TransmogrifAI.git","clone_url":"https://github.com/salesforce/TransmogrifAI.git","svn_url":"https://github.com/salesforce/TransmogrifAI","homepage":"https://transmogrif.ai","size":111986,"stargazers_count":1083,"watchers_count":1083,"language":"Scala","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":167,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":167,"open_issues":19,"watchers":1083,"default_branch":"master"}},"base":{"label":"salesforce:master","ref":"master","sha":"77f19200e1bebacd47d354eefef54046b48c638c","user":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":109289451,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkyODk0NTE=","name":"TransmogrifAI","full_name":"salesforce/TransmogrifAI","private":false,"owner":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/salesforce/TransmogrifAI","description":"TransmogrifAI (pronounced trăns-mŏgˈrə-fī) is an AutoML library for building modular, reusable, strongly typed machine learning workflows on Spark with minimal hand tuning","fork":false,"url":"https://api.github.com/repos/salesforce/TransmogrifAI","forks_url":"https://api.github.com/repos/salesforce/TransmogrifAI/forks","keys_url":"https://api.github.com/repos/salesforce/TransmogrifAI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salesforce/TransmogrifAI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salesforce/TransmogrifAI/teams","hooks_url":"https://api.github.com/repos/salesforce/TransmogrifAI/hooks","issue_events_url":"https://api.github.com/repos/salesforce/TransmogrifAI/issues/events{/number}","events_url":"https://api.github.com/repos/salesforce/TransmogrifAI/events","assignees_url":"https://api.github.com/repos/salesforce/TransmogrifAI/assignees{/user}","branches_url":"https://api.github.com/repos/salesforce/TransmogrifAI/branches{/branch}","tags_url":"https://api.github.com/repos/salesforce/TransmogrifAI/tags","blobs_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/refs{/sha}","trees_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salesforce/TransmogrifAI/statuses/{sha}","languages_url":"https://api.github.com/repos/salesforce/TransmogrifAI/languages","stargazers_url":"https://api.github.com/repos/salesforce/TransmogrifAI/stargazers","contributors_url":"https://api.github.com/repos/salesforce/TransmogrifAI/contributors","subscribers_url":"https://api.github.com/repos/salesforce/TransmogrifAI/subscribers","subscription_url":"https://api.github.com/repos/salesforce/TransmogrifAI/subscription","commits_url":"https://api.github.com/repos/salesforce/TransmogrifAI/commits{/sha}","git_commits_url":"https://api.github.com/repos/salesforce/TransmogrifAI/git/commits{/sha}","comments_url":"https://api.github.com/repos/salesforce/TransmogrifAI/comments{/number}","issue_comment_url":"https://api.github.com/repos/salesforce/TransmogrifAI/issues/comments{/number}","contents_url":"https://api.github.com/repos/salesforce/TransmogrifAI/contents/{+path}","compare_url":"https://api.github.com/repos/salesforce/TransmogrifAI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salesforce/TransmogrifAI/merges","archive_url":"https://api.github.com/repos/salesforce/TransmogrifAI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salesforce/TransmogrifAI/downloads","issues_url":"https://api.github.com/repos/salesforce/TransmogrifAI/issues{/number}","pulls_url":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls{/number}","milestones_url":"https://api.github.com/repos/salesforce/TransmogrifAI/milestones{/number}","notifications_url":"https://api.github.com/repos/salesforce/TransmogrifAI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salesforce/TransmogrifAI/labels{/name}","releases_url":"https://api.github.com/repos/salesforce/TransmogrifAI/releases{/id}","deployments_url":"https://api.github.com/repos/salesforce/TransmogrifAI/deployments","created_at":"2017-11-02T16:15:15Z","updated_at":"2018-10-30T20:57:04Z","pushed_at":"2018-10-31T07:25:40Z","git_url":"git://github.com/salesforce/TransmogrifAI.git","ssh_url":"git@github.com:salesforce/TransmogrifAI.git","clone_url":"https://github.com/salesforce/TransmogrifAI.git","svn_url":"https://github.com/salesforce/TransmogrifAI","homepage":"https://transmogrif.ai","size":111986,"stargazers_count":1083,"watchers_count":1083,"language":"Scala","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":167,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":167,"open_issues":19,"watchers":1083,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/168"},"html":{"href":"https://github.com/salesforce/TransmogrifAI/pull/168"},"issue":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/issues/168"},"comments":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/salesforce/TransmogrifAI/statuses/d23029f3c1da56fd67566e0a8ba461d68b4a2801"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"leahmcguire"}}