{"action":"created","comment":{"url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/comments/72492730","id":72492730,"diff_hunk":"@@ -0,0 +1,70 @@\n+#ifndef MACHINELEARNING_TREE_CRITERION_HPP\n+#define MACHINELEARNING_TREE_CRITERION_HPP\n+\n+#include <math.h>\n+\n+namespace tree {\n+\n+/**\n+ * @brief Base class that defines the many criterious of splitting.\n+ *\n+ * This interface provides some methods that are used to compute the impurity of a given Node object.\n+ * Some impurity measures are Gini, Entrophy and Missclassification Error Rate for classification problens and MSE for regression\n+ * problems.\n+ */\n+class CriterionInterface {\n+protected:\n+  /**\n+   * @brief default constructor.\n+   */\n+  CriterionInterface() {}\n+\n+  /**\n+   * @brief Compute the Gini index impurity measure for the given node.\n+   * @param node contains the representation of points that will be used to compute the impurity.\n+   * @return the impurity of the data in the given node.\n+   */\n+  virtual double GiniImpurityMeasure(const Node & node) const = 0;\n+\n+  /**\n+   * @brief Compute the Entropy measure error given the data of a given node.\n+   * @param node is the data representation of points used to compute the impurity measure.\n+   * @return the impurity of the data in the given node.\n+   */\n+  virtual double EntropyImpurityMeasure(const Node & node) const = 0;\n+\n+  /**\n+   * @brief Compute the Miss Classification Error as the impurity measure of a given node.\n+   * @param node is the data representation of points used to compute the impurity measure.\n+   * @return the impurity of the data in the given node.\n+   */\n+  virtual double MissClassificationError(const Node & node) const = 0;\n+\n+  /**\n+   * @brief Compute the Information Gain, which is the maximization of the gain using Entropy as the impurity measure.\n+   * @param node is the data representation of points used to compute the impurity measure.\n+   * @return the gain of information using entropy for the given node.\n+   */\n+  virtual double InformationGain(const Node & node) const = 0;\n+\n+  /**\n+   * @brief Compute the Gain using the Weighted Average Gini Index, which is the maximization using gini as the impurity\n+   * measure.\n+   * @param node is the data representation of points used to compute the impurity measure.\n+   * @return the gain using weighted average gini index for the given node.\n+   */\n+  virtual double WeightedAverageGiniIndex(const Node & node) const = 0;\n+\n+  /**\n+   * @brief Compute the maximization of the gain when considering the maximization of Weighted Average Miss.\n+   * Classification Error.\n+   * @param node is the data representation of poinst used to compute the impurity measure.\n+   * @return the gain using weighted average miss classification error for the given node.\n+   */\n+  virtual double WeightedAverageMissClassificationError(const Node & node) const = 0;\n+\n+};\n+\n+} // namespace tree\n+\n+#endif //MACHINELEARNING_TREE_CRITERION_HPP","path":"tree/criterion_interface.hpp","position":70,"original_position":70,"commit_id":"8b8d00d5530bfeba776cc0040d49e6f3825a5d94","original_commit_id":"8b8d00d5530bfeba776cc0040d49e6f3825a5d94","user":{"login":"clebsonc","id":8453238,"avatar_url":"https://avatars.githubusercontent.com/u/8453238?v=3","gravatar_id":"","url":"https://api.github.com/users/clebsonc","html_url":"https://github.com/clebsonc","followers_url":"https://api.github.com/users/clebsonc/followers","following_url":"https://api.github.com/users/clebsonc/following{/other_user}","gists_url":"https://api.github.com/users/clebsonc/gists{/gist_id}","starred_url":"https://api.github.com/users/clebsonc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebsonc/subscriptions","organizations_url":"https://api.github.com/users/clebsonc/orgs","repos_url":"https://api.github.com/users/clebsonc/repos","events_url":"https://api.github.com/users/clebsonc/events{/privacy}","received_events_url":"https://api.github.com/users/clebsonc/received_events","type":"User","site_admin":false},"body":"Ok, I put it because the style guide uses it. The reference is this: [link](https://google.github.io/styleguide/cppguide.html#The__define_Guard)\r\n\r\nAre we going to maintain it or just remove it?\r\n","created_at":"2016-07-27T18:13:01Z","updated_at":"2016-07-27T18:13:01Z","html_url":"https://github.com/LBD-UFMG/MachineLearning/pull/13#discussion_r72492730","pull_request_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/comments/72492730"},"html":{"href":"https://github.com/LBD-UFMG/MachineLearning/pull/13#discussion_r72492730"},"pull_request":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/13","id":78958681,"html_url":"https://github.com/LBD-UFMG/MachineLearning/pull/13","diff_url":"https://github.com/LBD-UFMG/MachineLearning/pull/13.diff","patch_url":"https://github.com/LBD-UFMG/MachineLearning/pull/13.patch","issue_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/13","number":13,"state":"open","locked":false,"title":"Criterion build","user":{"login":"clebsonc","id":8453238,"avatar_url":"https://avatars.githubusercontent.com/u/8453238?v=3","gravatar_id":"","url":"https://api.github.com/users/clebsonc","html_url":"https://github.com/clebsonc","followers_url":"https://api.github.com/users/clebsonc/followers","following_url":"https://api.github.com/users/clebsonc/following{/other_user}","gists_url":"https://api.github.com/users/clebsonc/gists{/gist_id}","starred_url":"https://api.github.com/users/clebsonc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebsonc/subscriptions","organizations_url":"https://api.github.com/users/clebsonc/orgs","repos_url":"https://api.github.com/users/clebsonc/repos","events_url":"https://api.github.com/users/clebsonc/events{/privacy}","received_events_url":"https://api.github.com/users/clebsonc/received_events","type":"User","site_admin":false},"body":"Interface criterion build. \r\nPlease @raphaelcampos, @luizfgoncalves, @gcmgomes   check if everything is okay. I tried to follow the rules from the style guide and from the doxygen. I'm not sure if everything is okay, but anything just mention  and I will modify to keep the same pattern.","created_at":"2016-07-27T03:06:11Z","updated_at":"2016-07-27T18:13:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4181654a44203bea2bbec1d1fc6270453e8abab4","assignee":{"login":"gcmgomes","id":6178368,"avatar_url":"https://avatars.githubusercontent.com/u/6178368?v=3","gravatar_id":"","url":"https://api.github.com/users/gcmgomes","html_url":"https://github.com/gcmgomes","followers_url":"https://api.github.com/users/gcmgomes/followers","following_url":"https://api.github.com/users/gcmgomes/following{/other_user}","gists_url":"https://api.github.com/users/gcmgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/gcmgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcmgomes/subscriptions","organizations_url":"https://api.github.com/users/gcmgomes/orgs","repos_url":"https://api.github.com/users/gcmgomes/repos","events_url":"https://api.github.com/users/gcmgomes/events{/privacy}","received_events_url":"https://api.github.com/users/gcmgomes/received_events","type":"User","site_admin":false},"assignees":[{"login":"gcmgomes","id":6178368,"avatar_url":"https://avatars.githubusercontent.com/u/6178368?v=3","gravatar_id":"","url":"https://api.github.com/users/gcmgomes","html_url":"https://github.com/gcmgomes","followers_url":"https://api.github.com/users/gcmgomes/followers","following_url":"https://api.github.com/users/gcmgomes/following{/other_user}","gists_url":"https://api.github.com/users/gcmgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/gcmgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcmgomes/subscriptions","organizations_url":"https://api.github.com/users/gcmgomes/orgs","repos_url":"https://api.github.com/users/gcmgomes/repos","events_url":"https://api.github.com/users/gcmgomes/events{/privacy}","received_events_url":"https://api.github.com/users/gcmgomes/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/13/commits","review_comments_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/13/comments","review_comment_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/13/comments","statuses_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/statuses/8b8d00d5530bfeba776cc0040d49e6f3825a5d94","head":{"label":"LBD-UFMG:criterion","ref":"criterion","sha":"8b8d00d5530bfeba776cc0040d49e6f3825a5d94","user":{"login":"LBD-UFMG","id":20340452,"avatar_url":"https://avatars.githubusercontent.com/u/20340452?v=3","gravatar_id":"","url":"https://api.github.com/users/LBD-UFMG","html_url":"https://github.com/LBD-UFMG","followers_url":"https://api.github.com/users/LBD-UFMG/followers","following_url":"https://api.github.com/users/LBD-UFMG/following{/other_user}","gists_url":"https://api.github.com/users/LBD-UFMG/gists{/gist_id}","starred_url":"https://api.github.com/users/LBD-UFMG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LBD-UFMG/subscriptions","organizations_url":"https://api.github.com/users/LBD-UFMG/orgs","repos_url":"https://api.github.com/users/LBD-UFMG/repos","events_url":"https://api.github.com/users/LBD-UFMG/events{/privacy}","received_events_url":"https://api.github.com/users/LBD-UFMG/received_events","type":"Organization","site_admin":false},"repo":{"id":63195373,"name":"MachineLearning","full_name":"LBD-UFMG/MachineLearning","owner":{"login":"LBD-UFMG","id":20340452,"avatar_url":"https://avatars.githubusercontent.com/u/20340452?v=3","gravatar_id":"","url":"https://api.github.com/users/LBD-UFMG","html_url":"https://github.com/LBD-UFMG","followers_url":"https://api.github.com/users/LBD-UFMG/followers","following_url":"https://api.github.com/users/LBD-UFMG/following{/other_user}","gists_url":"https://api.github.com/users/LBD-UFMG/gists{/gist_id}","starred_url":"https://api.github.com/users/LBD-UFMG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LBD-UFMG/subscriptions","organizations_url":"https://api.github.com/users/LBD-UFMG/orgs","repos_url":"https://api.github.com/users/LBD-UFMG/repos","events_url":"https://api.github.com/users/LBD-UFMG/events{/privacy}","received_events_url":"https://api.github.com/users/LBD-UFMG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LBD-UFMG/MachineLearning","description":"An implementation of some machine learning methods, such as Bayesian Networks and Random Forests.","fork":false,"url":"https://api.github.com/repos/LBD-UFMG/MachineLearning","forks_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/forks","keys_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/teams","hooks_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/hooks","issue_events_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/events{/number}","events_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/events","assignees_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/assignees{/user}","branches_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/branches{/branch}","tags_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/tags","blobs_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/refs{/sha}","trees_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/statuses/{sha}","languages_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/languages","stargazers_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/stargazers","contributors_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/contributors","subscribers_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/subscribers","subscription_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/subscription","commits_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/commits{/sha}","git_commits_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/commits{/sha}","comments_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/comments{/number}","issue_comment_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/comments{/number}","contents_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/contents/{+path}","compare_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/merges","archive_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/downloads","issues_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues{/number}","pulls_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls{/number}","milestones_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/milestones{/number}","notifications_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/labels{/name}","releases_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/releases{/id}","deployments_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/deployments","created_at":"2016-07-12T22:03:51Z","updated_at":"2016-07-22T15:21:07Z","pushed_at":"2016-07-27T03:44:43Z","git_url":"git://github.com/LBD-UFMG/MachineLearning.git","ssh_url":"git@github.com:LBD-UFMG/MachineLearning.git","clone_url":"https://github.com/LBD-UFMG/MachineLearning.git","svn_url":"https://github.com/LBD-UFMG/MachineLearning","homepage":"","size":44,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":1,"default_branch":"master"}},"base":{"label":"LBD-UFMG:master","ref":"master","sha":"adca313b5022ed7df25d851417fea3fdcf05d8de","user":{"login":"LBD-UFMG","id":20340452,"avatar_url":"https://avatars.githubusercontent.com/u/20340452?v=3","gravatar_id":"","url":"https://api.github.com/users/LBD-UFMG","html_url":"https://github.com/LBD-UFMG","followers_url":"https://api.github.com/users/LBD-UFMG/followers","following_url":"https://api.github.com/users/LBD-UFMG/following{/other_user}","gists_url":"https://api.github.com/users/LBD-UFMG/gists{/gist_id}","starred_url":"https://api.github.com/users/LBD-UFMG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LBD-UFMG/subscriptions","organizations_url":"https://api.github.com/users/LBD-UFMG/orgs","repos_url":"https://api.github.com/users/LBD-UFMG/repos","events_url":"https://api.github.com/users/LBD-UFMG/events{/privacy}","received_events_url":"https://api.github.com/users/LBD-UFMG/received_events","type":"Organization","site_admin":false},"repo":{"id":63195373,"name":"MachineLearning","full_name":"LBD-UFMG/MachineLearning","owner":{"login":"LBD-UFMG","id":20340452,"avatar_url":"https://avatars.githubusercontent.com/u/20340452?v=3","gravatar_id":"","url":"https://api.github.com/users/LBD-UFMG","html_url":"https://github.com/LBD-UFMG","followers_url":"https://api.github.com/users/LBD-UFMG/followers","following_url":"https://api.github.com/users/LBD-UFMG/following{/other_user}","gists_url":"https://api.github.com/users/LBD-UFMG/gists{/gist_id}","starred_url":"https://api.github.com/users/LBD-UFMG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LBD-UFMG/subscriptions","organizations_url":"https://api.github.com/users/LBD-UFMG/orgs","repos_url":"https://api.github.com/users/LBD-UFMG/repos","events_url":"https://api.github.com/users/LBD-UFMG/events{/privacy}","received_events_url":"https://api.github.com/users/LBD-UFMG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LBD-UFMG/MachineLearning","description":"An implementation of some machine learning methods, such as Bayesian Networks and Random Forests.","fork":false,"url":"https://api.github.com/repos/LBD-UFMG/MachineLearning","forks_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/forks","keys_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/teams","hooks_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/hooks","issue_events_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/events{/number}","events_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/events","assignees_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/assignees{/user}","branches_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/branches{/branch}","tags_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/tags","blobs_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/refs{/sha}","trees_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/statuses/{sha}","languages_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/languages","stargazers_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/stargazers","contributors_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/contributors","subscribers_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/subscribers","subscription_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/subscription","commits_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/commits{/sha}","git_commits_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/git/commits{/sha}","comments_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/comments{/number}","issue_comment_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/comments{/number}","contents_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/contents/{+path}","compare_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/merges","archive_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/downloads","issues_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues{/number}","pulls_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls{/number}","milestones_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/milestones{/number}","notifications_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/labels{/name}","releases_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/releases{/id}","deployments_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/deployments","created_at":"2016-07-12T22:03:51Z","updated_at":"2016-07-22T15:21:07Z","pushed_at":"2016-07-27T03:44:43Z","git_url":"git://github.com/LBD-UFMG/MachineLearning.git","ssh_url":"git@github.com:LBD-UFMG/MachineLearning.git","clone_url":"https://github.com/LBD-UFMG/MachineLearning.git","svn_url":"https://github.com/LBD-UFMG/MachineLearning","homepage":"","size":44,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/13"},"html":{"href":"https://github.com/LBD-UFMG/MachineLearning/pull/13"},"issue":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/13"},"comments":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/statuses/8b8d00d5530bfeba776cc0040d49e6f3825a5d94"}}}}
{"actor":{"display_login":"clebsonc"}}