{"action":"created","comment":{"url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/comments/72903688","id":72903688,"diff_hunk":"@@ -0,0 +1,45 @@\n+#ifndef  _MACHINELEARNING_BASE_LEARNER_H_ \n+#define  _MACHINELEARNING_BASE_LEARNER_H_\n+\n+#include <vector>\n+\n+namespace base {\n+\n+/**\n+ * Base class for all learning algorithm implementations.\n+ */\n+class Learner{\n+\n+  public:\n+\n+    /**\n+     * \\brief Standard destructor.\n+     */\n+    virtual ~Learner();\n+\n+    /**\n+     * Train the learner with a given dataset.\n+     * \\param X A pointer object of Collection.\n+     */\n+    virtual void Train(/*const Collection *X*/);\n+\n+    /**\n+     * Predicts the labels of the instances of X based on the fitted model.\n+     * \\param X           A pointer object of Collection.\n+     * \\param prediction  Instances prediction.\n+     */\n+    virtual void Predict(/*const Collection *X,*/ std::vector<double> &prediction) = 0;","path":"base/learner.h","position":31,"original_position":31,"commit_id":"1e200b4ca25dcc325c112c0ce4524c2eb68499dd","original_commit_id":"1e200b4ca25dcc325c112c0ce4524c2eb68499dd","user":{"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},"body":"Otherway around.","created_at":"2016-07-31T12:49:07Z","updated_at":"2016-07-31T12:49:07Z","html_url":"https://github.com/LBD-UFMG/MachineLearning/pull/24#discussion_r72903688","pull_request_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/comments/72903688"},"html":{"href":"https://github.com/LBD-UFMG/MachineLearning/pull/24#discussion_r72903688"},"pull_request":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/24","id":79469969,"html_url":"https://github.com/LBD-UFMG/MachineLearning/pull/24","diff_url":"https://github.com/LBD-UFMG/MachineLearning/pull/24.diff","patch_url":"https://github.com/LBD-UFMG/MachineLearning/pull/24.patch","issue_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/24","number":24,"state":"open","locked":false,"title":"defining learner interface","user":{"login":"raphaelcampos","id":3073266,"avatar_url":"https://avatars.githubusercontent.com/u/3073266?v=3","gravatar_id":"","url":"https://api.github.com/users/raphaelcampos","html_url":"https://github.com/raphaelcampos","followers_url":"https://api.github.com/users/raphaelcampos/followers","following_url":"https://api.github.com/users/raphaelcampos/following{/other_user}","gists_url":"https://api.github.com/users/raphaelcampos/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelcampos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelcampos/subscriptions","organizations_url":"https://api.github.com/users/raphaelcampos/orgs","repos_url":"https://api.github.com/users/raphaelcampos/repos","events_url":"https://api.github.com/users/raphaelcampos/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelcampos/received_events","type":"User","site_admin":false},"body":"I created an interface for Learner instead of two (Classifier. Regressor) because they have pretty much the same methods the difference is on their implementation. I also thought about, for example, parameters tuning, having one generic interface we could use the same method for parameter tuning of Classifiers, Regressors.\r\n\r\nPlease review my code. this is related to issue #18 .\r\n\r\n@clebsonc\r\n","created_at":"2016-07-30T22:42:11Z","updated_at":"2016-07-31T12:49:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91ec77d295d0da519e1044a10e8e10d9b229de31","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/24/commits","review_comments_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/24/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/24/comments","statuses_url":"https://api.github.com/repos/LBD-UFMG/MachineLearning/statuses/1e200b4ca25dcc325c112c0ce4524c2eb68499dd","head":{"label":"LBD-UFMG:learner","ref":"learner","sha":"1e200b4ca25dcc325c112c0ce4524c2eb68499dd","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-30T22:42:14Z","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":59,"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":15,"forks":2,"open_issues":15,"watchers":1,"default_branch":"master"}},"base":{"label":"LBD-UFMG:master","ref":"master","sha":"0a8e37b36757e7496726ec0565335c2f2f4722d8","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-30T22:42:14Z","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":59,"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":15,"forks":2,"open_issues":15,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/24"},"html":{"href":"https://github.com/LBD-UFMG/MachineLearning/pull/24"},"issue":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/24"},"comments":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/pulls/24/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/24/commits"},"statuses":{"href":"https://api.github.com/repos/LBD-UFMG/MachineLearning/statuses/1e200b4ca25dcc325c112c0ce4524c2eb68499dd"}}}}
{"actor":{"display_login":"gcmgomes"}}