{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/169834018","pull_request_review_id":98394092,"id":169834018,"diff_hunk":"@@ -359,29 +339,6 @@ class DecisionTreeSuite extends SparkFunSuite with MLlibTestSparkContext {\n     assert(rootNode.stats.isEmpty)\n   }\n \n-  test(\"do not choose split that does not satisfy min instance per node requirements\") {\n-    // if a split does not satisfy min instances per node requirements,\n-    // this split is invalid, even though the information gain of split is large.\n-    val arr = Array(\n-      LabeledPoint(0.0, Vectors.dense(0.0, 1.0)),","path":"mllib/src/test/scala/org/apache/spark/mllib/tree/DecisionTreeSuite.scala","position":35,"original_position":35,"commit_id":"eeb3cc93ffa39198ccaba75fc7a63032325baf1e","original_commit_id":"eeb3cc93ffa39198ccaba75fc7a63032325baf1e","user":{"login":"sethah","id":7275795,"avatar_url":"https://avatars2.githubusercontent.com/u/7275795?v=4","gravatar_id":"","url":"https://api.github.com/users/sethah","html_url":"https://github.com/sethah","followers_url":"https://api.github.com/users/sethah/followers","following_url":"https://api.github.com/users/sethah/following{/other_user}","gists_url":"https://api.github.com/users/sethah/gists{/gist_id}","starred_url":"https://api.github.com/users/sethah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethah/subscriptions","organizations_url":"https://api.github.com/users/sethah/orgs","repos_url":"https://api.github.com/users/sethah/repos","events_url":"https://api.github.com/users/sethah/events{/privacy}","received_events_url":"https://api.github.com/users/sethah/received_events","type":"User","site_admin":false},"body":"Here again. You can fix this by inverting the labels. Probably an easier fix than moving and re-writing the test.","created_at":"2018-02-22T01:43:58Z","updated_at":"2018-02-22T01:47:02Z","html_url":"https://github.com/apache/spark/pull/20632#discussion_r169834018","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/20632","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/169834018"},"html":{"href":"https://github.com/apache/spark/pull/20632#discussion_r169834018"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/20632"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/20632","id":169769239,"html_url":"https://github.com/apache/spark/pull/20632","diff_url":"https://github.com/apache/spark/pull/20632.diff","patch_url":"https://github.com/apache/spark/pull/20632.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/20632","number":20632,"state":"open","locked":false,"title":"[SPARK-3159] added subtree pruning in the translation from LearningNode to Node, added unit tests for tree redundancy and adapted existing ones that were affected","user":{"login":"asolimando","id":18898964,"avatar_url":"https://avatars2.githubusercontent.com/u/18898964?v=4","gravatar_id":"","url":"https://api.github.com/users/asolimando","html_url":"https://github.com/asolimando","followers_url":"https://api.github.com/users/asolimando/followers","following_url":"https://api.github.com/users/asolimando/following{/other_user}","gists_url":"https://api.github.com/users/asolimando/gists{/gist_id}","starred_url":"https://api.github.com/users/asolimando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asolimando/subscriptions","organizations_url":"https://api.github.com/users/asolimando/orgs","repos_url":"https://api.github.com/users/asolimando/repos","events_url":"https://api.github.com/users/asolimando/events{/privacy}","received_events_url":"https://api.github.com/users/asolimando/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nAdded subtree pruning in the translation from LearningNode to Node: a learning node having a single prediction value for all the leaves in the subtree rooted at it is translated into a LeafNode, instead of a (redundant) InternalNode \r\n\r\n## How was this patch tested?\r\n\r\nAdded two unit tests under \"mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala\":\r\n- test(\"[SPARK-3159] tree model redundancy - binary classification\")\r\n- test(\"[SPARK-3159] tree model redundancy - multiclass classification\")\r\n\r\n4 existing unit tests relying on the tree structure (existence of a specific redundant subtree) had to be adapted as the tested components in the output tree are now pruned:\r\nthe tests where checking on properties on some nodes (e.g., the details of the split), following what done in several other unit tests in the same files, those tests have been adapted to work on the intermediary data used in the learning phase rather than on the output model\r\n","created_at":"2018-02-17T05:18:09Z","updated_at":"2018-02-22T01:47:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c8f4c544a52887c7f29fe590b11cd7ab701fdde","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/20632/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/20632/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/20632/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/eeb3cc93ffa39198ccaba75fc7a63032325baf1e","head":{"label":"asolimando:master","ref":"master","sha":"eeb3cc93ffa39198ccaba75fc7a63032325baf1e","user":{"login":"asolimando","id":18898964,"avatar_url":"https://avatars2.githubusercontent.com/u/18898964?v=4","gravatar_id":"","url":"https://api.github.com/users/asolimando","html_url":"https://github.com/asolimando","followers_url":"https://api.github.com/users/asolimando/followers","following_url":"https://api.github.com/users/asolimando/following{/other_user}","gists_url":"https://api.github.com/users/asolimando/gists{/gist_id}","starred_url":"https://api.github.com/users/asolimando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asolimando/subscriptions","organizations_url":"https://api.github.com/users/asolimando/orgs","repos_url":"https://api.github.com/users/asolimando/repos","events_url":"https://api.github.com/users/asolimando/events{/privacy}","received_events_url":"https://api.github.com/users/asolimando/received_events","type":"User","site_admin":false},"repo":{"id":117347684,"name":"spark","full_name":"asolimando/spark","owner":{"login":"asolimando","id":18898964,"avatar_url":"https://avatars2.githubusercontent.com/u/18898964?v=4","gravatar_id":"","url":"https://api.github.com/users/asolimando","html_url":"https://github.com/asolimando","followers_url":"https://api.github.com/users/asolimando/followers","following_url":"https://api.github.com/users/asolimando/following{/other_user}","gists_url":"https://api.github.com/users/asolimando/gists{/gist_id}","starred_url":"https://api.github.com/users/asolimando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asolimando/subscriptions","organizations_url":"https://api.github.com/users/asolimando/orgs","repos_url":"https://api.github.com/users/asolimando/repos","events_url":"https://api.github.com/users/asolimando/events{/privacy}","received_events_url":"https://api.github.com/users/asolimando/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asolimando/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/asolimando/spark","forks_url":"https://api.github.com/repos/asolimando/spark/forks","keys_url":"https://api.github.com/repos/asolimando/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asolimando/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asolimando/spark/teams","hooks_url":"https://api.github.com/repos/asolimando/spark/hooks","issue_events_url":"https://api.github.com/repos/asolimando/spark/issues/events{/number}","events_url":"https://api.github.com/repos/asolimando/spark/events","assignees_url":"https://api.github.com/repos/asolimando/spark/assignees{/user}","branches_url":"https://api.github.com/repos/asolimando/spark/branches{/branch}","tags_url":"https://api.github.com/repos/asolimando/spark/tags","blobs_url":"https://api.github.com/repos/asolimando/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asolimando/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asolimando/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/asolimando/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asolimando/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/asolimando/spark/languages","stargazers_url":"https://api.github.com/repos/asolimando/spark/stargazers","contributors_url":"https://api.github.com/repos/asolimando/spark/contributors","subscribers_url":"https://api.github.com/repos/asolimando/spark/subscribers","subscription_url":"https://api.github.com/repos/asolimando/spark/subscription","commits_url":"https://api.github.com/repos/asolimando/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/asolimando/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/asolimando/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/asolimando/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/asolimando/spark/contents/{+path}","compare_url":"https://api.github.com/repos/asolimando/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asolimando/spark/merges","archive_url":"https://api.github.com/repos/asolimando/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asolimando/spark/downloads","issues_url":"https://api.github.com/repos/asolimando/spark/issues{/number}","pulls_url":"https://api.github.com/repos/asolimando/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/asolimando/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/asolimando/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asolimando/spark/labels{/name}","releases_url":"https://api.github.com/repos/asolimando/spark/releases{/id}","deployments_url":"https://api.github.com/repos/asolimando/spark/deployments","created_at":"2018-01-13T13:56:32Z","updated_at":"2018-01-13T13:56:59Z","pushed_at":"2018-02-20T20:16:10Z","git_url":"git://github.com/asolimando/spark.git","ssh_url":"git@github.com:asolimando/spark.git","clone_url":"https://github.com/asolimando/spark.git","svn_url":"https://github.com/asolimando/spark","homepage":null,"size":267572,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"83c008762af444eef73d835eb6f506ecf5aebc17","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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://avatars0.githubusercontent.com/u/47359?v=4","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":"2018-02-21T19:31:11Z","pushed_at":"2018-02-22T01:26:51Z","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":268203,"stargazers_count":16217,"watchers_count":16217,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15007,"mirror_url":null,"archived":false,"open_issues_count":433,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":15007,"open_issues":433,"watchers":16217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/20632"},"html":{"href":"https://github.com/apache/spark/pull/20632"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/20632"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/20632/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/20632/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/20632/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/eeb3cc93ffa39198ccaba75fc7a63032325baf1e"}},"author_association":"NONE"}}
{"actor":{"display_login":"sethah"}}