{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/29610780","id":29610780,"diff_hunk":"@@ -129,8 +129,8 @@ private object GBTClassifierSuite {\n     val newData: DataFrame = TreeTests.setMetadata(data, categoricalFeatures, numClasses = 2)\n     val newModel = gbt.fit(newData)\n     // Use parent, fittingParamMap from newTree since these are not checked anyways.","path":"mllib/src/test/scala/org/apache/spark/ml/classification/GBTClassifierSuite.scala","position":3,"original_position":3,"commit_id":"7bef88d5bdaf40b80e3925522b352f8b86a07c94","original_commit_id":"7bef88d5bdaf40b80e3925522b352f8b86a07c94","user":{"login":"jkbradley","id":5084283,"avatar_url":"https://avatars.githubusercontent.com/u/5084283?v=3","gravatar_id":"","url":"https://api.github.com/users/jkbradley","html_url":"https://github.com/jkbradley","followers_url":"https://api.github.com/users/jkbradley/followers","following_url":"https://api.github.com/users/jkbradley/following{/other_user}","gists_url":"https://api.github.com/users/jkbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbradley/subscriptions","organizations_url":"https://api.github.com/users/jkbradley/orgs","repos_url":"https://api.github.com/users/jkbradley/repos","events_url":"https://api.github.com/users/jkbradley/events{/privacy}","received_events_url":"https://api.github.com/users/jkbradley/received_events","type":"User","site_admin":false},"body":"update comment: remove \"fittingParamMap\"","created_at":"2015-05-04T18:42:14Z","updated_at":"2015-05-04T18:42:14Z","html_url":"https://github.com/apache/spark/pull/5820#discussion_r29610780","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/5820","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/29610780"},"html":{"href":"https://github.com/apache/spark/pull/5820#discussion_r29610780"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/5820"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/5820","id":34499601,"html_url":"https://github.com/apache/spark/pull/5820","diff_url":"https://github.com/apache/spark/pull/5820.diff","patch_url":"https://github.com/apache/spark/pull/5820.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/5820","number":5820,"state":"closed","locked":false,"title":"[SPARK-5956][MLLIB] Pipeline components should be copyable.","user":{"login":"mengxr","id":829644,"avatar_url":"https://avatars.githubusercontent.com/u/829644?v=3","gravatar_id":"","url":"https://api.github.com/users/mengxr","html_url":"https://github.com/mengxr","followers_url":"https://api.github.com/users/mengxr/followers","following_url":"https://api.github.com/users/mengxr/following{/other_user}","gists_url":"https://api.github.com/users/mengxr/gists{/gist_id}","starred_url":"https://api.github.com/users/mengxr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mengxr/subscriptions","organizations_url":"https://api.github.com/users/mengxr/orgs","repos_url":"https://api.github.com/users/mengxr/repos","events_url":"https://api.github.com/users/mengxr/events{/privacy}","received_events_url":"https://api.github.com/users/mengxr/received_events","type":"User","site_admin":false},"body":"This PR added `copy(extra: ParamMap): Params` to `Params`, which makes a copy of the current instance with a randomly generated uid and some extra param values. With this change, we only need to implement `fit` and `transform` without extra param values given the default implementation of `fit(dataset, extra)`:\r\n\r\n~~~scala\r\ndef fit(dataset: DataFrame, extra: ParamMap): Model = {\r\n  copy(extra).fit(dataset)\r\n}\r\n~~~\r\n\r\nInside `fit` and `transform`, since only the embedded values are used, I added `$` as an alias for `getOrDefault` to make the code easier to read. For example, in `LinearRegression.fit` we have:\r\n\r\n~~~scala\r\nval effectiveRegParam = $(regParam) / yStd\r\nval effectiveL1RegParam = $(elasticNetParam) * effectiveRegParam\r\nval effectiveL2RegParam = (1.0 - $(elasticNetParam)) * effectiveRegParam\r\n~~~\r\n\r\nMeta-algorithm like `Pipeline` implements its own `copy(extra)`. So the fitted pipeline model stored all copied stages (no matter whether it is a transformer or a model).\r\n\r\nOther changes:\r\n* `Params$.inheritValues` is moved to `Params!.copyValues` and returns the target instance.\r\n* `fittingParamMap` was removed because the `parent` carries this information.\r\n* `validate` was renamed to `validateParams` to be more precise.\r\n\r\nTODOs:\r\n* [x] add tests for newly added methods\r\n* [ ] update documentation\r\n\r\n@jkbradley @dbtsai","created_at":"2015-04-30T20:49:38Z","updated_at":"2015-05-04T18:42:14Z","closed_at":"2015-05-04T18:30:02Z","merged_at":null,"merge_commit_sha":"45dc8e92cf7a5af4cef349c07e5152e7fc0cce29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/5820/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/5820/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/5820/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/7bef88d5bdaf40b80e3925522b352f8b86a07c94","head":{"label":"mengxr:SPARK-5956","ref":"SPARK-5956","sha":"7bef88d5bdaf40b80e3925522b352f8b86a07c94","user":{"login":"mengxr","id":829644,"avatar_url":"https://avatars.githubusercontent.com/u/829644?v=3","gravatar_id":"","url":"https://api.github.com/users/mengxr","html_url":"https://github.com/mengxr","followers_url":"https://api.github.com/users/mengxr/followers","following_url":"https://api.github.com/users/mengxr/following{/other_user}","gists_url":"https://api.github.com/users/mengxr/gists{/gist_id}","starred_url":"https://api.github.com/users/mengxr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mengxr/subscriptions","organizations_url":"https://api.github.com/users/mengxr/orgs","repos_url":"https://api.github.com/users/mengxr/repos","events_url":"https://api.github.com/users/mengxr/events{/privacy}","received_events_url":"https://api.github.com/users/mengxr/received_events","type":"User","site_admin":false},"repo":{"id":17278743,"name":"spark","full_name":"mengxr/spark","owner":{"login":"mengxr","id":829644,"avatar_url":"https://avatars.githubusercontent.com/u/829644?v=3","gravatar_id":"","url":"https://api.github.com/users/mengxr","html_url":"https://github.com/mengxr","followers_url":"https://api.github.com/users/mengxr/followers","following_url":"https://api.github.com/users/mengxr/following{/other_user}","gists_url":"https://api.github.com/users/mengxr/gists{/gist_id}","starred_url":"https://api.github.com/users/mengxr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mengxr/subscriptions","organizations_url":"https://api.github.com/users/mengxr/orgs","repos_url":"https://api.github.com/users/mengxr/repos","events_url":"https://api.github.com/users/mengxr/events{/privacy}","received_events_url":"https://api.github.com/users/mengxr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mengxr/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/mengxr/spark","forks_url":"https://api.github.com/repos/mengxr/spark/forks","keys_url":"https://api.github.com/repos/mengxr/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mengxr/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mengxr/spark/teams","hooks_url":"https://api.github.com/repos/mengxr/spark/hooks","issue_events_url":"https://api.github.com/repos/mengxr/spark/issues/events{/number}","events_url":"https://api.github.com/repos/mengxr/spark/events","assignees_url":"https://api.github.com/repos/mengxr/spark/assignees{/user}","branches_url":"https://api.github.com/repos/mengxr/spark/branches{/branch}","tags_url":"https://api.github.com/repos/mengxr/spark/tags","blobs_url":"https://api.github.com/repos/mengxr/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mengxr/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mengxr/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/mengxr/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mengxr/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/mengxr/spark/languages","stargazers_url":"https://api.github.com/repos/mengxr/spark/stargazers","contributors_url":"https://api.github.com/repos/mengxr/spark/contributors","subscribers_url":"https://api.github.com/repos/mengxr/spark/subscribers","subscription_url":"https://api.github.com/repos/mengxr/spark/subscription","commits_url":"https://api.github.com/repos/mengxr/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/mengxr/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/mengxr/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/mengxr/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/mengxr/spark/contents/{+path}","compare_url":"https://api.github.com/repos/mengxr/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mengxr/spark/merges","archive_url":"https://api.github.com/repos/mengxr/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mengxr/spark/downloads","issues_url":"https://api.github.com/repos/mengxr/spark/issues{/number}","pulls_url":"https://api.github.com/repos/mengxr/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/mengxr/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/mengxr/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mengxr/spark/labels{/name}","releases_url":"https://api.github.com/repos/mengxr/spark/releases{/id}","created_at":"2014-02-28T07:27:59Z","updated_at":"2015-03-03T21:18:41Z","pushed_at":"2015-05-04T08:11:59Z","git_url":"git://github.com/mengxr/spark.git","ssh_url":"git@github.com:mengxr/spark.git","clone_url":"https://github.com/mengxr/spark.git","svn_url":"https://github.com/mengxr/spark","homepage":null,"size":107923,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"ecc6eb50a59172dc132bd8f97957734f6f009024","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-05-04T18:36:34Z","pushed_at":"2015-05-04T18:29:26Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1587788,"stargazers_count":3852,"watchers_count":3852,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3343,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":306,"forks":3343,"open_issues":306,"watchers":3852,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/5820"},"html":{"href":"https://github.com/apache/spark/pull/5820"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/5820"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/5820/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/5820/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/5820/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/7bef88d5bdaf40b80e3925522b352f8b86a07c94"}}}}