{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/80355103","id":80355103,"diff_hunk":"@@ -160,6 +166,12 @@ final class ChiSqSelector @Since(\"1.6.0\") (@Since(\"1.6.0\") override val uid: Str\n \n   @Since(\"1.6.0\")\n   override def transformSchema(schema: StructType): StructType = {\n+    val otherPairs = OldChiSqSelector.supportedTypeAndParamPairs.filter(_._1 == $(selectorType))","path":"mllib/src/main/scala/org/apache/spark/ml/feature/ChiSqSelector.scala","position":null,"original_position":144,"commit_id":"16347f477a0b74cd844fe4dfddc95a27ecc186de","original_commit_id":"8d1536a683ac6c237f8995f335121929ad85e3c8","user":{"login":"yanboliang","id":1962026,"avatar_url":"https://avatars.githubusercontent.com/u/1962026?v=3","gravatar_id":"","url":"https://api.github.com/users/yanboliang","html_url":"https://github.com/yanboliang","followers_url":"https://api.github.com/users/yanboliang/followers","following_url":"https://api.github.com/users/yanboliang/following{/other_user}","gists_url":"https://api.github.com/users/yanboliang/gists{/gist_id}","starred_url":"https://api.github.com/users/yanboliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanboliang/subscriptions","organizations_url":"https://api.github.com/users/yanboliang/orgs","repos_url":"https://api.github.com/users/yanboliang/repos","events_url":"https://api.github.com/users/yanboliang/events{/privacy}","received_events_url":"https://api.github.com/users/yanboliang/received_events","type":"User","site_admin":false},"body":"Sorry, typo.","created_at":"2016-09-24T07:47:47Z","updated_at":"2016-09-24T07:47:47Z","html_url":"https://github.com/apache/spark/pull/15214#discussion_r80355103","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/15214","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/80355103"},"html":{"href":"https://github.com/apache/spark/pull/15214#discussion_r80355103"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/15214"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/15214","id":86501199,"html_url":"https://github.com/apache/spark/pull/15214","diff_url":"https://github.com/apache/spark/pull/15214.diff","patch_url":"https://github.com/apache/spark/pull/15214.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/15214","number":15214,"state":"open","locked":false,"title":"[SPARK-17017][Follow-up][ML] Refactor of ChiSqSelector and add ML Python API.","user":{"login":"yanboliang","id":1962026,"avatar_url":"https://avatars.githubusercontent.com/u/1962026?v=3","gravatar_id":"","url":"https://api.github.com/users/yanboliang","html_url":"https://github.com/yanboliang","followers_url":"https://api.github.com/users/yanboliang/followers","following_url":"https://api.github.com/users/yanboliang/following{/other_user}","gists_url":"https://api.github.com/users/yanboliang/gists{/gist_id}","starred_url":"https://api.github.com/users/yanboliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanboliang/subscriptions","organizations_url":"https://api.github.com/users/yanboliang/orgs","repos_url":"https://api.github.com/users/yanboliang/repos","events_url":"https://api.github.com/users/yanboliang/events{/privacy}","received_events_url":"https://api.github.com/users/yanboliang/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n#14597 modified ```ChiSqSelector``` to support ```fpr``` type selector, however, it left some issue need to be addressed:\r\n* We should allow users to set selector type explicitly rather than switching them by using different setting function, since the setting order will involves some unexpected issue. For example, if users both set ```numTopFeatures``` and ```percentile```, it will train ```kbest``` or ```percentile``` model based on the order of setting (the latter setting one will be trained). This make users confused, and we should allow users to set selector type explicitly. We handle similar issues at other place of ML code base such as ```GeneralizedLinearRegression``` and ```LogisticRegression```.\r\n* Meanwhile, if there are more than one parameter except ```alpha``` can be set for ```fpr``` model, we can not handle it elegantly in the existing framework. And similar issues for ```kbest``` and ```percentile``` model. Setting selector type explicitly can solve this issue also.\r\n* If setting selector type explicitly by users is allowed, we should handle param interaction such as if users set ```selectorType = percentile``` and ```alpha = 0.1```, we should notify users the parameter ```alpha``` will take no effect. We should handle complex parameter interaction checks at ```transformSchema```. (FYI #11620)\r\n* We should use lower case of the selector type names to follow MLlib convention.\r\n* Add ML Python API.\r\n\r\n## How was this patch tested?\r\nUnit test.\r\n","created_at":"2016-09-23T12:03:53Z","updated_at":"2016-09-24T07:47:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20d598e0ceac888b00da468badc97b75cd906dd5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/15214/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/15214/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/15214/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/16347f477a0b74cd844fe4dfddc95a27ecc186de","head":{"label":"yanboliang:spark-17017","ref":"spark-17017","sha":"16347f477a0b74cd844fe4dfddc95a27ecc186de","user":{"login":"yanboliang","id":1962026,"avatar_url":"https://avatars.githubusercontent.com/u/1962026?v=3","gravatar_id":"","url":"https://api.github.com/users/yanboliang","html_url":"https://github.com/yanboliang","followers_url":"https://api.github.com/users/yanboliang/followers","following_url":"https://api.github.com/users/yanboliang/following{/other_user}","gists_url":"https://api.github.com/users/yanboliang/gists{/gist_id}","starred_url":"https://api.github.com/users/yanboliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanboliang/subscriptions","organizations_url":"https://api.github.com/users/yanboliang/orgs","repos_url":"https://api.github.com/users/yanboliang/repos","events_url":"https://api.github.com/users/yanboliang/events{/privacy}","received_events_url":"https://api.github.com/users/yanboliang/received_events","type":"User","site_admin":false},"repo":{"id":21890948,"name":"spark","full_name":"yanboliang/spark","owner":{"login":"yanboliang","id":1962026,"avatar_url":"https://avatars.githubusercontent.com/u/1962026?v=3","gravatar_id":"","url":"https://api.github.com/users/yanboliang","html_url":"https://github.com/yanboliang","followers_url":"https://api.github.com/users/yanboliang/followers","following_url":"https://api.github.com/users/yanboliang/following{/other_user}","gists_url":"https://api.github.com/users/yanboliang/gists{/gist_id}","starred_url":"https://api.github.com/users/yanboliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanboliang/subscriptions","organizations_url":"https://api.github.com/users/yanboliang/orgs","repos_url":"https://api.github.com/users/yanboliang/repos","events_url":"https://api.github.com/users/yanboliang/events{/privacy}","received_events_url":"https://api.github.com/users/yanboliang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yanboliang/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/yanboliang/spark","forks_url":"https://api.github.com/repos/yanboliang/spark/forks","keys_url":"https://api.github.com/repos/yanboliang/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yanboliang/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yanboliang/spark/teams","hooks_url":"https://api.github.com/repos/yanboliang/spark/hooks","issue_events_url":"https://api.github.com/repos/yanboliang/spark/issues/events{/number}","events_url":"https://api.github.com/repos/yanboliang/spark/events","assignees_url":"https://api.github.com/repos/yanboliang/spark/assignees{/user}","branches_url":"https://api.github.com/repos/yanboliang/spark/branches{/branch}","tags_url":"https://api.github.com/repos/yanboliang/spark/tags","blobs_url":"https://api.github.com/repos/yanboliang/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yanboliang/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yanboliang/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/yanboliang/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yanboliang/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/yanboliang/spark/languages","stargazers_url":"https://api.github.com/repos/yanboliang/spark/stargazers","contributors_url":"https://api.github.com/repos/yanboliang/spark/contributors","subscribers_url":"https://api.github.com/repos/yanboliang/spark/subscribers","subscription_url":"https://api.github.com/repos/yanboliang/spark/subscription","commits_url":"https://api.github.com/repos/yanboliang/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/yanboliang/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/yanboliang/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/yanboliang/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/yanboliang/spark/contents/{+path}","compare_url":"https://api.github.com/repos/yanboliang/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yanboliang/spark/merges","archive_url":"https://api.github.com/repos/yanboliang/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yanboliang/spark/downloads","issues_url":"https://api.github.com/repos/yanboliang/spark/issues{/number}","pulls_url":"https://api.github.com/repos/yanboliang/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/yanboliang/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/yanboliang/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yanboliang/spark/labels{/name}","releases_url":"https://api.github.com/repos/yanboliang/spark/releases{/id}","deployments_url":"https://api.github.com/repos/yanboliang/spark/deployments","created_at":"2014-07-16T07:24:13Z","updated_at":"2016-04-08T13:35:05Z","pushed_at":"2016-09-24T07:46:04Z","git_url":"git://github.com/yanboliang/spark.git","ssh_url":"git@github.com:yanboliang/spark.git","clone_url":"https://github.com/yanboliang/spark.git","svn_url":"https://github.com/yanboliang/spark","homepage":null,"size":172034,"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":"90d5754212425d55f992c939a2bc7d9ac6ef92b8","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}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2016-09-24T07:09:52Z","pushed_at":"2016-09-24T07:46:07Z","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":529768,"stargazers_count":10140,"watchers_count":10140,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9440,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":468,"forks":9440,"open_issues":468,"watchers":10140,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/15214"},"html":{"href":"https://github.com/apache/spark/pull/15214"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/15214"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/15214/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/15214/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/15214/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/16347f477a0b74cd844fe4dfddc95a27ecc186de"}}}}
{"actor":{"display_login":"yanboliang"}}