{"action":"created","issue":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/1309","repository_url":"https://api.github.com/repos/mlpack/mlpack","labels_url":"https://api.github.com/repos/mlpack/mlpack/issues/1309/labels{/name}","comments_url":"https://api.github.com/repos/mlpack/mlpack/issues/1309/comments","events_url":"https://api.github.com/repos/mlpack/mlpack/issues/1309/events","html_url":"https://github.com/mlpack/mlpack/pull/1309","id":304568146,"number":1309,"title":"[WIP] Reduced error pruning (Regularisation) for decision tree","user":{"login":"Manthan-R-Sheth","id":8593057,"avatar_url":"https://avatars1.githubusercontent.com/u/8593057?v=4","gravatar_id":"","url":"https://api.github.com/users/Manthan-R-Sheth","html_url":"https://github.com/Manthan-R-Sheth","followers_url":"https://api.github.com/users/Manthan-R-Sheth/followers","following_url":"https://api.github.com/users/Manthan-R-Sheth/following{/other_user}","gists_url":"https://api.github.com/users/Manthan-R-Sheth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manthan-R-Sheth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manthan-R-Sheth/subscriptions","organizations_url":"https://api.github.com/users/Manthan-R-Sheth/orgs","repos_url":"https://api.github.com/users/Manthan-R-Sheth/repos","events_url":"https://api.github.com/users/Manthan-R-Sheth/events{/privacy}","received_events_url":"https://api.github.com/users/Manthan-R-Sheth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-12T22:48:06Z","updated_at":"2018-03-15T16:46:02Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mlpack/mlpack/pulls/1309","html_url":"https://github.com/mlpack/mlpack/pull/1309","diff_url":"https://github.com/mlpack/mlpack/pull/1309.diff","patch_url":"https://github.com/mlpack/mlpack/pull/1309.patch"},"body":"This is a work in progress PR for implementing the pruning of decision tree which acts like a regulariser for decision tree. This PR implements reduced error (minimum error) tree pruning algorithm on validation set. \r\nIt begins pruning from leaf nodes and recursively prunes each node in the tree if the accuracy on the validation set increases, thereby giving minimum error tree as the end result.\r\n\r\nTODO list :- \r\n- [ ]  Include a `count` parameter in each node to calculate the exact `classProbabilities`and `dimensionTypeOrMajorityClass` for leaf nodes.\r\n\r\n- [ ]  Reduce the number of local copies due to various recursive calls.\r\n\r\n- [ ] Write tests for testing the pruning algorithm.\r\n\r\n- [ ] Make `ValidateScore` a template parameter to include smallest tree pruning algorithm (and many more) as well.\r\n\r\nSuggestions on this first prototype would be very helpful, @rcurtin @zoq "},"comment":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/comments/373444257","html_url":"https://github.com/mlpack/mlpack/pull/1309#issuecomment-373444257","issue_url":"https://api.github.com/repos/mlpack/mlpack/issues/1309","id":373444257,"user":{"login":"Manthan-R-Sheth","id":8593057,"avatar_url":"https://avatars1.githubusercontent.com/u/8593057?v=4","gravatar_id":"","url":"https://api.github.com/users/Manthan-R-Sheth","html_url":"https://github.com/Manthan-R-Sheth","followers_url":"https://api.github.com/users/Manthan-R-Sheth/followers","following_url":"https://api.github.com/users/Manthan-R-Sheth/following{/other_user}","gists_url":"https://api.github.com/users/Manthan-R-Sheth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manthan-R-Sheth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manthan-R-Sheth/subscriptions","organizations_url":"https://api.github.com/users/Manthan-R-Sheth/orgs","repos_url":"https://api.github.com/users/Manthan-R-Sheth/repos","events_url":"https://api.github.com/users/Manthan-R-Sheth/events{/privacy}","received_events_url":"https://api.github.com/users/Manthan-R-Sheth/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T16:46:02Z","updated_at":"2018-03-15T16:46:02Z","author_association":"NONE","body":"@zoq @rcurtin \r\nAt the time of pruning, the current node should be assigned the majority class of the data that it holds and not the first child's majority class. Can you help me as to how can I implement that.\r\nI am thinking of holding a count at each node and then using the count and classProbabilities, calculate the majority class.\r\nIs this good enough?"}}
{"actor":{"display_login":"Manthan-R-Sheth"}}