{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/37943396","id":37943396,"diff_hunk":"@@ -801,6 +801,173 @@ jsc.stop();\n \n </div>\n \n+## Example: Model Selection via Train Validation Split\n+In addition to  `CrossValidator` Spark also offers\n+[`TrainValidationSplit`](api/scala/index.html#org.apache.spark.ml.tuning.TrainValidationSplit) for hyper-parameter tuning.\n+It randomly splits the input dataset into train and validation sets based on ratio passed as parameter\n+and use evaluation metric on the validation set to select the best model.","path":"docs/ml-guide.md","position":8,"original_position":8,"commit_id":"fb3b1d6b3c592e485482c1096e0f4ed432739505","original_commit_id":"fb3b1d6b3c592e485482c1096e0f4ed432739505","user":{"login":"feynmanliang","id":990069,"avatar_url":"https://avatars.githubusercontent.com/u/990069?v=3","gravatar_id":"","url":"https://api.github.com/users/feynmanliang","html_url":"https://github.com/feynmanliang","followers_url":"https://api.github.com/users/feynmanliang/followers","following_url":"https://api.github.com/users/feynmanliang/following{/other_user}","gists_url":"https://api.github.com/users/feynmanliang/gists{/gist_id}","starred_url":"https://api.github.com/users/feynmanliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feynmanliang/subscriptions","organizations_url":"https://api.github.com/users/feynmanliang/orgs","repos_url":"https://api.github.com/users/feynmanliang/repos","events_url":"https://api.github.com/users/feynmanliang/events{/privacy}","received_events_url":"https://api.github.com/users/feynmanliang/received_events","type":"User","site_admin":false},"body":"nit: \"and use\" -> \"and uses the\"","created_at":"2015-08-26T03:24:53Z","updated_at":"2015-08-26T03:24:53Z","html_url":"https://github.com/apache/spark/pull/8377#discussion_r37943396","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/8377","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/37943396"},"html":{"href":"https://github.com/apache/spark/pull/8377#discussion_r37943396"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/8377"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8377","id":43115284,"html_url":"https://github.com/apache/spark/pull/8377","diff_url":"https://github.com/apache/spark/pull/8377.diff","patch_url":"https://github.com/apache/spark/pull/8377.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/8377","number":8377,"state":"open","locked":false,"title":"[SPARK-9910][ML]User guide for train validation split","user":{"login":"zapletal-martin","id":6018812,"avatar_url":"https://avatars.githubusercontent.com/u/6018812?v=3","gravatar_id":"","url":"https://api.github.com/users/zapletal-martin","html_url":"https://github.com/zapletal-martin","followers_url":"https://api.github.com/users/zapletal-martin/followers","following_url":"https://api.github.com/users/zapletal-martin/following{/other_user}","gists_url":"https://api.github.com/users/zapletal-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/zapletal-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zapletal-martin/subscriptions","organizations_url":"https://api.github.com/users/zapletal-martin/orgs","repos_url":"https://api.github.com/users/zapletal-martin/repos","events_url":"https://api.github.com/users/zapletal-martin/events{/privacy}","received_events_url":"https://api.github.com/users/zapletal-martin/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-23T04:21:46Z","updated_at":"2015-08-26T03:24:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6c5aabbc83e78e1f98c72c743f178104fa9e6eb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/8377/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/8377/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/8377/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/fb3b1d6b3c592e485482c1096e0f4ed432739505","head":{"label":"zapletal-martin:SPARK-9910","ref":"SPARK-9910","sha":"fb3b1d6b3c592e485482c1096e0f4ed432739505","user":{"login":"zapletal-martin","id":6018812,"avatar_url":"https://avatars.githubusercontent.com/u/6018812?v=3","gravatar_id":"","url":"https://api.github.com/users/zapletal-martin","html_url":"https://github.com/zapletal-martin","followers_url":"https://api.github.com/users/zapletal-martin/followers","following_url":"https://api.github.com/users/zapletal-martin/following{/other_user}","gists_url":"https://api.github.com/users/zapletal-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/zapletal-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zapletal-martin/subscriptions","organizations_url":"https://api.github.com/users/zapletal-martin/orgs","repos_url":"https://api.github.com/users/zapletal-martin/repos","events_url":"https://api.github.com/users/zapletal-martin/events{/privacy}","received_events_url":"https://api.github.com/users/zapletal-martin/received_events","type":"User","site_admin":false},"repo":{"id":18732272,"name":"spark","full_name":"zapletal-martin/spark","owner":{"login":"zapletal-martin","id":6018812,"avatar_url":"https://avatars.githubusercontent.com/u/6018812?v=3","gravatar_id":"","url":"https://api.github.com/users/zapletal-martin","html_url":"https://github.com/zapletal-martin","followers_url":"https://api.github.com/users/zapletal-martin/followers","following_url":"https://api.github.com/users/zapletal-martin/following{/other_user}","gists_url":"https://api.github.com/users/zapletal-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/zapletal-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zapletal-martin/subscriptions","organizations_url":"https://api.github.com/users/zapletal-martin/orgs","repos_url":"https://api.github.com/users/zapletal-martin/repos","events_url":"https://api.github.com/users/zapletal-martin/events{/privacy}","received_events_url":"https://api.github.com/users/zapletal-martin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zapletal-martin/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/zapletal-martin/spark","forks_url":"https://api.github.com/repos/zapletal-martin/spark/forks","keys_url":"https://api.github.com/repos/zapletal-martin/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zapletal-martin/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zapletal-martin/spark/teams","hooks_url":"https://api.github.com/repos/zapletal-martin/spark/hooks","issue_events_url":"https://api.github.com/repos/zapletal-martin/spark/issues/events{/number}","events_url":"https://api.github.com/repos/zapletal-martin/spark/events","assignees_url":"https://api.github.com/repos/zapletal-martin/spark/assignees{/user}","branches_url":"https://api.github.com/repos/zapletal-martin/spark/branches{/branch}","tags_url":"https://api.github.com/repos/zapletal-martin/spark/tags","blobs_url":"https://api.github.com/repos/zapletal-martin/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zapletal-martin/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zapletal-martin/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/zapletal-martin/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zapletal-martin/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/zapletal-martin/spark/languages","stargazers_url":"https://api.github.com/repos/zapletal-martin/spark/stargazers","contributors_url":"https://api.github.com/repos/zapletal-martin/spark/contributors","subscribers_url":"https://api.github.com/repos/zapletal-martin/spark/subscribers","subscription_url":"https://api.github.com/repos/zapletal-martin/spark/subscription","commits_url":"https://api.github.com/repos/zapletal-martin/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/zapletal-martin/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/zapletal-martin/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/zapletal-martin/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/zapletal-martin/spark/contents/{+path}","compare_url":"https://api.github.com/repos/zapletal-martin/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zapletal-martin/spark/merges","archive_url":"https://api.github.com/repos/zapletal-martin/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zapletal-martin/spark/downloads","issues_url":"https://api.github.com/repos/zapletal-martin/spark/issues{/number}","pulls_url":"https://api.github.com/repos/zapletal-martin/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/zapletal-martin/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/zapletal-martin/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zapletal-martin/spark/labels{/name}","releases_url":"https://api.github.com/repos/zapletal-martin/spark/releases{/id}","created_at":"2014-04-13T15:24:04Z","updated_at":"2015-05-07T14:11:46Z","pushed_at":"2015-08-23T04:21:09Z","git_url":"git://github.com/zapletal-martin/spark.git","ssh_url":"git@github.com:zapletal-martin/spark.git","clone_url":"https://github.com/zapletal-martin/spark.git","svn_url":"https://github.com/zapletal-martin/spark","homepage":null,"size":107824,"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":"90cb9f05655a25b95b8f9fe81da14e5b9c8bcf44","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-08-26T01:28:05Z","pushed_at":"2015-08-26T03:10:11Z","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":1678358,"stargazers_count":5186,"watchers_count":5186,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4766,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":356,"forks":4766,"open_issues":356,"watchers":5186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/8377"},"html":{"href":"https://github.com/apache/spark/pull/8377"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/8377"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/8377/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/8377/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/8377/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/fb3b1d6b3c592e485482c1096e0f4ed432739505"}}}}