{"action":"created","issue":{"url":"https://api.github.com/repos/jabbermonkey/dtree_bias_var/issues/1","repository_url":"https://api.github.com/repos/jabbermonkey/dtree_bias_var","labels_url":"https://api.github.com/repos/jabbermonkey/dtree_bias_var/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jabbermonkey/dtree_bias_var/issues/1/comments","events_url":"https://api.github.com/repos/jabbermonkey/dtree_bias_var/issues/1/events","html_url":"https://github.com/jabbermonkey/dtree_bias_var/issues/1","id":147969293,"number":1,"title":"wrong calculation of info gain function ","user":{"login":"surajrautela","id":9991571,"avatar_url":"https://avatars.githubusercontent.com/u/9991571?v=3","gravatar_id":"","url":"https://api.github.com/users/surajrautela","html_url":"https://github.com/surajrautela","followers_url":"https://api.github.com/users/surajrautela/followers","following_url":"https://api.github.com/users/surajrautela/following{/other_user}","gists_url":"https://api.github.com/users/surajrautela/gists{/gist_id}","starred_url":"https://api.github.com/users/surajrautela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surajrautela/subscriptions","organizations_url":"https://api.github.com/users/surajrautela/orgs","repos_url":"https://api.github.com/users/surajrautela/repos","events_url":"https://api.github.com/users/surajrautela/events{/privacy}","received_events_url":"https://api.github.com/users/surajrautela/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-13T07:21:43Z","updated_at":"2016-04-13T14:53:28Z","closed_at":"2016-04-13T14:53:28Z","body":"The code used in the info gain function is wrong it should be entropy(labels)-(EA/total_sum)"},"comment":{"url":"https://api.github.com/repos/jabbermonkey/dtree_bias_var/issues/comments/209488294","html_url":"https://github.com/jabbermonkey/dtree_bias_var/issues/1#issuecomment-209488294","issue_url":"https://api.github.com/repos/jabbermonkey/dtree_bias_var/issues/1","id":209488294,"user":{"login":"jabbermonkey","id":407652,"avatar_url":"https://avatars.githubusercontent.com/u/407652?v=3","gravatar_id":"","url":"https://api.github.com/users/jabbermonkey","html_url":"https://github.com/jabbermonkey","followers_url":"https://api.github.com/users/jabbermonkey/followers","following_url":"https://api.github.com/users/jabbermonkey/following{/other_user}","gists_url":"https://api.github.com/users/jabbermonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/jabbermonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jabbermonkey/subscriptions","organizations_url":"https://api.github.com/users/jabbermonkey/orgs","repos_url":"https://api.github.com/users/jabbermonkey/repos","events_url":"https://api.github.com/users/jabbermonkey/events{/privacy}","received_events_url":"https://api.github.com/users/jabbermonkey/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T14:53:28Z","updated_at":"2016-04-13T14:53:28Z","body":"Thanks @surajrautela. I've updated to subtract from entropy for labels (i.e. the global entropy) as you suggested. \r\n\r\nThe weighting used for each attribute value's entropy within the attribute entropy calculation loop is attr_val_count / total_count. I just pushed the division of the total outside of the sum loop to improve performance. Based on this it doesn't look like total_count needs to be replaced with a total_sum. \r\n"}}