{"action":"created","comment":{"url":"https://api.github.com/repos/pgmpy/pgmpy/pulls/comments/66312036","id":66312036,"diff_hunk":"@@ -0,0 +1,72 @@\n+from __future__ import division\n+\n+from six import with_metaclass\n+from abc import ABCMeta, abstractmethod\n+\n+import numpy as np\n+\n+from pgmpy.factors import ContinuousFactor\n+\n+\n+class BaseDiscretizer(with_metaclass(ABCMeta)):","path":"pgmpy/continuous/discretize/base.py","position":11,"original_position":11,"commit_id":"c5e1d428a628817c88267c739c9313944826e841","original_commit_id":"c5e1d428a628817c88267c739c9313944826e841","user":{"login":"yashu-seth","id":14197921,"avatar_url":"https://avatars.githubusercontent.com/u/14197921?v=3","gravatar_id":"","url":"https://api.github.com/users/yashu-seth","html_url":"https://github.com/yashu-seth","followers_url":"https://api.github.com/users/yashu-seth/followers","following_url":"https://api.github.com/users/yashu-seth/following{/other_user}","gists_url":"https://api.github.com/users/yashu-seth/gists{/gist_id}","starred_url":"https://api.github.com/users/yashu-seth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yashu-seth/subscriptions","organizations_url":"https://api.github.com/users/yashu-seth/orgs","repos_url":"https://api.github.com/users/yashu-seth/repos","events_url":"https://api.github.com/users/yashu-seth/events{/privacy}","received_events_url":"https://api.github.com/users/yashu-seth/received_events","type":"User","site_admin":false},"body":"@ankurankan I have used the abc module to implement the abstract method ```get_discrete_values```. It requires using a metaclass ```abc.ABCMeta```. Since metaclasses are used differently in python 2 and 3, I used ```six.with_metaclass```. An another way to do this would be using a decorator ```@add_metaclass(ABCMeta)``` on the ```BaseDiscretizer``` class.\r\nIf there is a better way to do this, please let me know. I will change it.","created_at":"2016-06-08T18:27:40Z","updated_at":"2016-06-08T18:27:40Z","html_url":"https://github.com/pgmpy/pgmpy/pull/686#discussion_r66312036","pull_request_url":"https://api.github.com/repos/pgmpy/pgmpy/pulls/686","_links":{"self":{"href":"https://api.github.com/repos/pgmpy/pgmpy/pulls/comments/66312036"},"html":{"href":"https://github.com/pgmpy/pgmpy/pull/686#discussion_r66312036"},"pull_request":{"href":"https://api.github.com/repos/pgmpy/pgmpy/pulls/686"}}},"pull_request":{"url":"https://api.github.com/repos/pgmpy/pgmpy/pulls/686","id":69267644,"html_url":"https://github.com/pgmpy/pgmpy/pull/686","diff_url":"https://github.com/pgmpy/pgmpy/pull/686.diff","patch_url":"https://github.com/pgmpy/pgmpy/pull/686.patch","issue_url":"https://api.github.com/repos/pgmpy/pgmpy/issues/686","number":686,"state":"open","locked":false,"title":"Adds base class for continuous node representation","user":{"login":"yashu-seth","id":14197921,"avatar_url":"https://avatars.githubusercontent.com/u/14197921?v=3","gravatar_id":"","url":"https://api.github.com/users/yashu-seth","html_url":"https://github.com/yashu-seth","followers_url":"https://api.github.com/users/yashu-seth/followers","following_url":"https://api.github.com/users/yashu-seth/following{/other_user}","gists_url":"https://api.github.com/users/yashu-seth/gists{/gist_id}","starred_url":"https://api.github.com/users/yashu-seth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yashu-seth/subscriptions","organizations_url":"https://api.github.com/users/yashu-seth/orgs","repos_url":"https://api.github.com/users/yashu-seth/repos","events_url":"https://api.github.com/users/yashu-seth/events{/privacy}","received_events_url":"https://api.github.com/users/yashu-seth/received_events","type":"User","site_admin":false},"body":"This PR deals with the basic continuous node representation feature. It will comprise a base class for Continuous node representation along with various methods to discretize the continuous variables into discrete factors.\r\nThis involves the first three weeks of my GSoC project.","created_at":"2016-05-08T12:21:38Z","updated_at":"2016-06-08T18:27:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5067d7e44c8139ad2655fce2891660d0de0f8600","assignee":{"login":"ankurankan","id":1461453,"avatar_url":"https://avatars.githubusercontent.com/u/1461453?v=3","gravatar_id":"","url":"https://api.github.com/users/ankurankan","html_url":"https://github.com/ankurankan","followers_url":"https://api.github.com/users/ankurankan/followers","following_url":"https://api.github.com/users/ankurankan/following{/other_user}","gists_url":"https://api.github.com/users/ankurankan/gists{/gist_id}","starred_url":"https://api.github.com/users/ankurankan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankurankan/subscriptions","organizations_url":"https://api.github.com/users/ankurankan/orgs","repos_url":"https://api.github.com/users/ankurankan/repos","events_url":"https://api.github.com/users/ankurankan/events{/privacy}","received_events_url":"https://api.github.com/users/ankurankan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/pgmpy/pgmpy/pulls/686/commits","review_comments_url":"https://api.github.com/repos/pgmpy/pgmpy/pulls/686/comments","review_comment_url":"https://api.github.com/repos/pgmpy/pgmpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pgmpy/pgmpy/issues/686/comments","statuses_url":"https://api.github.com/repos/pgmpy/pgmpy/statuses/c5e1d428a628817c88267c739c9313944826e841","head":{"label":"yashu-seth:support_for_continuous_nodes","ref":"support_for_continuous_nodes","sha":"c5e1d428a628817c88267c739c9313944826e841","user":{"login":"yashu-seth","id":14197921,"avatar_url":"https://avatars.githubusercontent.com/u/14197921?v=3","gravatar_id":"","url":"https://api.github.com/users/yashu-seth","html_url":"https://github.com/yashu-seth","followers_url":"https://api.github.com/users/yashu-seth/followers","following_url":"https://api.github.com/users/yashu-seth/following{/other_user}","gists_url":"https://api.github.com/users/yashu-seth/gists{/gist_id}","starred_url":"https://api.github.com/users/yashu-seth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yashu-seth/subscriptions","organizations_url":"https://api.github.com/users/yashu-seth/orgs","repos_url":"https://api.github.com/users/yashu-seth/repos","events_url":"https://api.github.com/users/yashu-seth/events{/privacy}","received_events_url":"https://api.github.com/users/yashu-seth/received_events","type":"User","site_admin":false},"repo":{"id":42327600,"name":"pgmpy","full_name":"yashu-seth/pgmpy","owner":{"login":"yashu-seth","id":14197921,"avatar_url":"https://avatars.githubusercontent.com/u/14197921?v=3","gravatar_id":"","url":"https://api.github.com/users/yashu-seth","html_url":"https://github.com/yashu-seth","followers_url":"https://api.github.com/users/yashu-seth/followers","following_url":"https://api.github.com/users/yashu-seth/following{/other_user}","gists_url":"https://api.github.com/users/yashu-seth/gists{/gist_id}","starred_url":"https://api.github.com/users/yashu-seth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yashu-seth/subscriptions","organizations_url":"https://api.github.com/users/yashu-seth/orgs","repos_url":"https://api.github.com/users/yashu-seth/repos","events_url":"https://api.github.com/users/yashu-seth/events{/privacy}","received_events_url":"https://api.github.com/users/yashu-seth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yashu-seth/pgmpy","description":"Python Library for Probabilistic Graphical Models","fork":true,"url":"https://api.github.com/repos/yashu-seth/pgmpy","forks_url":"https://api.github.com/repos/yashu-seth/pgmpy/forks","keys_url":"https://api.github.com/repos/yashu-seth/pgmpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yashu-seth/pgmpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yashu-seth/pgmpy/teams","hooks_url":"https://api.github.com/repos/yashu-seth/pgmpy/hooks","issue_events_url":"https://api.github.com/repos/yashu-seth/pgmpy/issues/events{/number}","events_url":"https://api.github.com/repos/yashu-seth/pgmpy/events","assignees_url":"https://api.github.com/repos/yashu-seth/pgmpy/assignees{/user}","branches_url":"https://api.github.com/repos/yashu-seth/pgmpy/branches{/branch}","tags_url":"https://api.github.com/repos/yashu-seth/pgmpy/tags","blobs_url":"https://api.github.com/repos/yashu-seth/pgmpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yashu-seth/pgmpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yashu-seth/pgmpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/yashu-seth/pgmpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yashu-seth/pgmpy/statuses/{sha}","languages_url":"https://api.github.com/repos/yashu-seth/pgmpy/languages","stargazers_url":"https://api.github.com/repos/yashu-seth/pgmpy/stargazers","contributors_url":"https://api.github.com/repos/yashu-seth/pgmpy/contributors","subscribers_url":"https://api.github.com/repos/yashu-seth/pgmpy/subscribers","subscription_url":"https://api.github.com/repos/yashu-seth/pgmpy/subscription","commits_url":"https://api.github.com/repos/yashu-seth/pgmpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/yashu-seth/pgmpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/yashu-seth/pgmpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/yashu-seth/pgmpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/yashu-seth/pgmpy/contents/{+path}","compare_url":"https://api.github.com/repos/yashu-seth/pgmpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yashu-seth/pgmpy/merges","archive_url":"https://api.github.com/repos/yashu-seth/pgmpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yashu-seth/pgmpy/downloads","issues_url":"https://api.github.com/repos/yashu-seth/pgmpy/issues{/number}","pulls_url":"https://api.github.com/repos/yashu-seth/pgmpy/pulls{/number}","milestones_url":"https://api.github.com/repos/yashu-seth/pgmpy/milestones{/number}","notifications_url":"https://api.github.com/repos/yashu-seth/pgmpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yashu-seth/pgmpy/labels{/name}","releases_url":"https://api.github.com/repos/yashu-seth/pgmpy/releases{/id}","deployments_url":"https://api.github.com/repos/yashu-seth/pgmpy/deployments","created_at":"2015-09-11T19:15:44Z","updated_at":"2015-09-11T19:15:45Z","pushed_at":"2016-06-08T12:14:43Z","git_url":"git://github.com/yashu-seth/pgmpy.git","ssh_url":"git@github.com:yashu-seth/pgmpy.git","clone_url":"https://github.com/yashu-seth/pgmpy.git","svn_url":"https://github.com/yashu-seth/pgmpy","homepage":null,"size":5089,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev"}},"base":{"label":"pgmpy:dev","ref":"dev","sha":"c9bc0e2e7b2f529229b86f76639dbfefc54adf2a","user":{"login":"pgmpy","id":5500131,"avatar_url":"https://avatars.githubusercontent.com/u/5500131?v=3","gravatar_id":"","url":"https://api.github.com/users/pgmpy","html_url":"https://github.com/pgmpy","followers_url":"https://api.github.com/users/pgmpy/followers","following_url":"https://api.github.com/users/pgmpy/following{/other_user}","gists_url":"https://api.github.com/users/pgmpy/gists{/gist_id}","starred_url":"https://api.github.com/users/pgmpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgmpy/subscriptions","organizations_url":"https://api.github.com/users/pgmpy/orgs","repos_url":"https://api.github.com/users/pgmpy/repos","events_url":"https://api.github.com/users/pgmpy/events{/privacy}","received_events_url":"https://api.github.com/users/pgmpy/received_events","type":"Organization","site_admin":false},"repo":{"id":12968651,"name":"pgmpy","full_name":"pgmpy/pgmpy","owner":{"login":"pgmpy","id":5500131,"avatar_url":"https://avatars.githubusercontent.com/u/5500131?v=3","gravatar_id":"","url":"https://api.github.com/users/pgmpy","html_url":"https://github.com/pgmpy","followers_url":"https://api.github.com/users/pgmpy/followers","following_url":"https://api.github.com/users/pgmpy/following{/other_user}","gists_url":"https://api.github.com/users/pgmpy/gists{/gist_id}","starred_url":"https://api.github.com/users/pgmpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgmpy/subscriptions","organizations_url":"https://api.github.com/users/pgmpy/orgs","repos_url":"https://api.github.com/users/pgmpy/repos","events_url":"https://api.github.com/users/pgmpy/events{/privacy}","received_events_url":"https://api.github.com/users/pgmpy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pgmpy/pgmpy","description":"Python Library for Probabilistic Graphical Models","fork":false,"url":"https://api.github.com/repos/pgmpy/pgmpy","forks_url":"https://api.github.com/repos/pgmpy/pgmpy/forks","keys_url":"https://api.github.com/repos/pgmpy/pgmpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pgmpy/pgmpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pgmpy/pgmpy/teams","hooks_url":"https://api.github.com/repos/pgmpy/pgmpy/hooks","issue_events_url":"https://api.github.com/repos/pgmpy/pgmpy/issues/events{/number}","events_url":"https://api.github.com/repos/pgmpy/pgmpy/events","assignees_url":"https://api.github.com/repos/pgmpy/pgmpy/assignees{/user}","branches_url":"https://api.github.com/repos/pgmpy/pgmpy/branches{/branch}","tags_url":"https://api.github.com/repos/pgmpy/pgmpy/tags","blobs_url":"https://api.github.com/repos/pgmpy/pgmpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pgmpy/pgmpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pgmpy/pgmpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/pgmpy/pgmpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pgmpy/pgmpy/statuses/{sha}","languages_url":"https://api.github.com/repos/pgmpy/pgmpy/languages","stargazers_url":"https://api.github.com/repos/pgmpy/pgmpy/stargazers","contributors_url":"https://api.github.com/repos/pgmpy/pgmpy/contributors","subscribers_url":"https://api.github.com/repos/pgmpy/pgmpy/subscribers","subscription_url":"https://api.github.com/repos/pgmpy/pgmpy/subscription","commits_url":"https://api.github.com/repos/pgmpy/pgmpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/pgmpy/pgmpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/pgmpy/pgmpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/pgmpy/pgmpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/pgmpy/pgmpy/contents/{+path}","compare_url":"https://api.github.com/repos/pgmpy/pgmpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pgmpy/pgmpy/merges","archive_url":"https://api.github.com/repos/pgmpy/pgmpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pgmpy/pgmpy/downloads","issues_url":"https://api.github.com/repos/pgmpy/pgmpy/issues{/number}","pulls_url":"https://api.github.com/repos/pgmpy/pgmpy/pulls{/number}","milestones_url":"https://api.github.com/repos/pgmpy/pgmpy/milestones{/number}","notifications_url":"https://api.github.com/repos/pgmpy/pgmpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pgmpy/pgmpy/labels{/name}","releases_url":"https://api.github.com/repos/pgmpy/pgmpy/releases{/id}","deployments_url":"https://api.github.com/repos/pgmpy/pgmpy/deployments","created_at":"2013-09-20T08:18:58Z","updated_at":"2016-06-08T14:24:02Z","pushed_at":"2016-06-08T12:14:43Z","git_url":"git://github.com/pgmpy/pgmpy.git","ssh_url":"git@github.com:pgmpy/pgmpy.git","clone_url":"https://github.com/pgmpy/pgmpy.git","svn_url":"https://github.com/pgmpy/pgmpy","homepage":null,"size":6167,"stargazers_count":239,"watchers_count":239,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":89,"forks":111,"open_issues":89,"watchers":239,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/pgmpy/pgmpy/pulls/686"},"html":{"href":"https://github.com/pgmpy/pgmpy/pull/686"},"issue":{"href":"https://api.github.com/repos/pgmpy/pgmpy/issues/686"},"comments":{"href":"https://api.github.com/repos/pgmpy/pgmpy/issues/686/comments"},"review_comments":{"href":"https://api.github.com/repos/pgmpy/pgmpy/pulls/686/comments"},"review_comment":{"href":"https://api.github.com/repos/pgmpy/pgmpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pgmpy/pgmpy/pulls/686/commits"},"statuses":{"href":"https://api.github.com/repos/pgmpy/pgmpy/statuses/c5e1d428a628817c88267c739c9313944826e841"}}}}
{"actor":{"display_login":"yashu-seth"}}