{"action":"created","comment":{"url":"https://api.github.com/repos/amueller/patsylearn/pulls/comments/171591329","pull_request_review_id":100470441,"id":171591329,"diff_hunk":"@@ -4,7 +4,8 @@\n from os.path import exists\n from setuptools import setup\n \n-setup(name='dask',","path":"setup.py","position":4,"original_position":4,"commit_id":"db96f27e385517faa043b98b1b9ee9b1ab998f76","original_commit_id":"db96f27e385517faa043b98b1b9ee9b1ab998f76","user":{"login":"amueller","id":449558,"avatar_url":"https://avatars3.githubusercontent.com/u/449558?v=4","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"body":"I don't even know why I put that there?!","created_at":"2018-03-01T15:20:12Z","updated_at":"2018-03-01T15:20:12Z","html_url":"https://github.com/amueller/patsylearn/pull/12#discussion_r171591329","pull_request_url":"https://api.github.com/repos/amueller/patsylearn/pulls/12","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/amueller/patsylearn/pulls/comments/171591329"},"html":{"href":"https://github.com/amueller/patsylearn/pull/12#discussion_r171591329"},"pull_request":{"href":"https://api.github.com/repos/amueller/patsylearn/pulls/12"}},"in_reply_to_id":171461341},"pull_request":{"url":"https://api.github.com/repos/amueller/patsylearn/pulls/12","id":93630372,"html_url":"https://github.com/amueller/patsylearn/pull/12","diff_url":"https://github.com/amueller/patsylearn/pull/12.diff","patch_url":"https://github.com/amueller/patsylearn/pull/12.patch","issue_url":"https://api.github.com/repos/amueller/patsylearn/issues/12","number":12,"state":"open","locked":false,"title":"Fixups, patsy consistency, and support for predict_proba","user":{"login":"ceholden","id":3585769,"avatar_url":"https://avatars0.githubusercontent.com/u/3585769?v=4","gravatar_id":"","url":"https://api.github.com/users/ceholden","html_url":"https://github.com/ceholden","followers_url":"https://api.github.com/users/ceholden/followers","following_url":"https://api.github.com/users/ceholden/following{/other_user}","gists_url":"https://api.github.com/users/ceholden/gists{/gist_id}","starred_url":"https://api.github.com/users/ceholden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceholden/subscriptions","organizations_url":"https://api.github.com/users/ceholden/orgs","repos_url":"https://api.github.com/users/ceholden/repos","events_url":"https://api.github.com/users/ceholden/events{/privacy}","received_events_url":"https://api.github.com/users/ceholden/received_events","type":"User","site_admin":false},"body":"Thanks for this work -- it's made my life a lot easier when running scikit-learn models on data, often derivations or subsets of data in `xarray.Dataset` objects.\r\n\r\nThis PR addresses four types of changes I've made to better use `patsylearn` in my work:\r\n\r\n1. Improve `setup.py` by fixing the package name (was `dask`) and by adding `install_requires` and `extras_require` for `pandas` support. Support for `pandas` is now optional for parity with `patsy`\r\n2. Change the `return_type` specification to be consistent with `patsy` language. Prior to PR, the return for `patsy.DesignMatrix` was given as `ndarray`, but the `patsy` convention is to use `matrix`. The checking for the return type in this library is specific to the `dataframe` return type, so code that uses the `matrix` specification will slip through and return the expected `patsy.DesignMatrix` and be backward-compatible.\r\n3. Add wrappers for `predict_proba` and `predict_log_proba` to the `PatsyModel` class.\r\n4. When the `return_type` is `dataframe`, return the output of the `sklearn` estimator as a `DataFrame`. Previously, when asked to return a `DataFrame` via `return_type=\"dataframe\"`, all methods would return a `np.ndarray` right from `sklearn` and the user would have to re-create this output into a `DataFrame` (see [SO question for example](https://stackoverflow.com/questions/35723472/how-to-use-sklearn-fit-transform-with-pandas-and-return-dataframe-instead-of-num)). This PR changes this behavior by returning a `DataFrame` where the index is from the input `X` and the column names are usually some derivation from the classes estimated.\r\n\r\n\r\nThe first change is just organizational, the second is perhaps pedantic but I think it is good to be consistent, and the third adds new code. The fourth change might change the return type for pre-existing users. I'm not sure what the install base is, but it looks like @sashaostr has incorporated it into their work as well as I have, so I'm especially happy to take feedback on this fourth change and in general.","created_at":"2016-11-14T19:25:40Z","updated_at":"2018-03-01T15:20:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51af63f4ebba1a4314bed254bb2ba51738560919","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/amueller/patsylearn/pulls/12/commits","review_comments_url":"https://api.github.com/repos/amueller/patsylearn/pulls/12/comments","review_comment_url":"https://api.github.com/repos/amueller/patsylearn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amueller/patsylearn/issues/12/comments","statuses_url":"https://api.github.com/repos/amueller/patsylearn/statuses/db96f27e385517faa043b98b1b9ee9b1ab998f76","head":{"label":"ceholden:master","ref":"master","sha":"db96f27e385517faa043b98b1b9ee9b1ab998f76","user":{"login":"ceholden","id":3585769,"avatar_url":"https://avatars0.githubusercontent.com/u/3585769?v=4","gravatar_id":"","url":"https://api.github.com/users/ceholden","html_url":"https://github.com/ceholden","followers_url":"https://api.github.com/users/ceholden/followers","following_url":"https://api.github.com/users/ceholden/following{/other_user}","gists_url":"https://api.github.com/users/ceholden/gists{/gist_id}","starred_url":"https://api.github.com/users/ceholden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceholden/subscriptions","organizations_url":"https://api.github.com/users/ceholden/orgs","repos_url":"https://api.github.com/users/ceholden/repos","events_url":"https://api.github.com/users/ceholden/events{/privacy}","received_events_url":"https://api.github.com/users/ceholden/received_events","type":"User","site_admin":false},"repo":{"id":66036101,"name":"patsylearn","full_name":"ceholden/patsylearn","owner":{"login":"ceholden","id":3585769,"avatar_url":"https://avatars0.githubusercontent.com/u/3585769?v=4","gravatar_id":"","url":"https://api.github.com/users/ceholden","html_url":"https://github.com/ceholden","followers_url":"https://api.github.com/users/ceholden/followers","following_url":"https://api.github.com/users/ceholden/following{/other_user}","gists_url":"https://api.github.com/users/ceholden/gists{/gist_id}","starred_url":"https://api.github.com/users/ceholden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceholden/subscriptions","organizations_url":"https://api.github.com/users/ceholden/orgs","repos_url":"https://api.github.com/users/ceholden/repos","events_url":"https://api.github.com/users/ceholden/events{/privacy}","received_events_url":"https://api.github.com/users/ceholden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ceholden/patsylearn","description":"Patsy Adaptors for Scikit-learn","fork":true,"url":"https://api.github.com/repos/ceholden/patsylearn","forks_url":"https://api.github.com/repos/ceholden/patsylearn/forks","keys_url":"https://api.github.com/repos/ceholden/patsylearn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceholden/patsylearn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceholden/patsylearn/teams","hooks_url":"https://api.github.com/repos/ceholden/patsylearn/hooks","issue_events_url":"https://api.github.com/repos/ceholden/patsylearn/issues/events{/number}","events_url":"https://api.github.com/repos/ceholden/patsylearn/events","assignees_url":"https://api.github.com/repos/ceholden/patsylearn/assignees{/user}","branches_url":"https://api.github.com/repos/ceholden/patsylearn/branches{/branch}","tags_url":"https://api.github.com/repos/ceholden/patsylearn/tags","blobs_url":"https://api.github.com/repos/ceholden/patsylearn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceholden/patsylearn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceholden/patsylearn/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceholden/patsylearn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceholden/patsylearn/statuses/{sha}","languages_url":"https://api.github.com/repos/ceholden/patsylearn/languages","stargazers_url":"https://api.github.com/repos/ceholden/patsylearn/stargazers","contributors_url":"https://api.github.com/repos/ceholden/patsylearn/contributors","subscribers_url":"https://api.github.com/repos/ceholden/patsylearn/subscribers","subscription_url":"https://api.github.com/repos/ceholden/patsylearn/subscription","commits_url":"https://api.github.com/repos/ceholden/patsylearn/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceholden/patsylearn/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceholden/patsylearn/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceholden/patsylearn/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceholden/patsylearn/contents/{+path}","compare_url":"https://api.github.com/repos/ceholden/patsylearn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceholden/patsylearn/merges","archive_url":"https://api.github.com/repos/ceholden/patsylearn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceholden/patsylearn/downloads","issues_url":"https://api.github.com/repos/ceholden/patsylearn/issues{/number}","pulls_url":"https://api.github.com/repos/ceholden/patsylearn/pulls{/number}","milestones_url":"https://api.github.com/repos/ceholden/patsylearn/milestones{/number}","notifications_url":"https://api.github.com/repos/ceholden/patsylearn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceholden/patsylearn/labels{/name}","releases_url":"https://api.github.com/repos/ceholden/patsylearn/releases{/id}","deployments_url":"https://api.github.com/repos/ceholden/patsylearn/deployments","created_at":"2016-08-18T22:58:04Z","updated_at":"2016-08-18T22:58:05Z","pushed_at":"2016-11-22T22:38:10Z","git_url":"git://github.com/ceholden/patsylearn.git","ssh_url":"git@github.com:ceholden/patsylearn.git","clone_url":"https://github.com/ceholden/patsylearn.git","svn_url":"https://github.com/ceholden/patsylearn","homepage":null,"size":35,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"amueller:master","ref":"master","sha":"f3c60dbd18bf556651d33614533c08f51344a571","user":{"login":"amueller","id":449558,"avatar_url":"https://avatars3.githubusercontent.com/u/449558?v=4","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"repo":{"id":43779699,"name":"patsylearn","full_name":"amueller/patsylearn","owner":{"login":"amueller","id":449558,"avatar_url":"https://avatars3.githubusercontent.com/u/449558?v=4","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amueller/patsylearn","description":"Patsy Adaptors for Scikit-learn","fork":false,"url":"https://api.github.com/repos/amueller/patsylearn","forks_url":"https://api.github.com/repos/amueller/patsylearn/forks","keys_url":"https://api.github.com/repos/amueller/patsylearn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amueller/patsylearn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amueller/patsylearn/teams","hooks_url":"https://api.github.com/repos/amueller/patsylearn/hooks","issue_events_url":"https://api.github.com/repos/amueller/patsylearn/issues/events{/number}","events_url":"https://api.github.com/repos/amueller/patsylearn/events","assignees_url":"https://api.github.com/repos/amueller/patsylearn/assignees{/user}","branches_url":"https://api.github.com/repos/amueller/patsylearn/branches{/branch}","tags_url":"https://api.github.com/repos/amueller/patsylearn/tags","blobs_url":"https://api.github.com/repos/amueller/patsylearn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amueller/patsylearn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amueller/patsylearn/git/refs{/sha}","trees_url":"https://api.github.com/repos/amueller/patsylearn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amueller/patsylearn/statuses/{sha}","languages_url":"https://api.github.com/repos/amueller/patsylearn/languages","stargazers_url":"https://api.github.com/repos/amueller/patsylearn/stargazers","contributors_url":"https://api.github.com/repos/amueller/patsylearn/contributors","subscribers_url":"https://api.github.com/repos/amueller/patsylearn/subscribers","subscription_url":"https://api.github.com/repos/amueller/patsylearn/subscription","commits_url":"https://api.github.com/repos/amueller/patsylearn/commits{/sha}","git_commits_url":"https://api.github.com/repos/amueller/patsylearn/git/commits{/sha}","comments_url":"https://api.github.com/repos/amueller/patsylearn/comments{/number}","issue_comment_url":"https://api.github.com/repos/amueller/patsylearn/issues/comments{/number}","contents_url":"https://api.github.com/repos/amueller/patsylearn/contents/{+path}","compare_url":"https://api.github.com/repos/amueller/patsylearn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amueller/patsylearn/merges","archive_url":"https://api.github.com/repos/amueller/patsylearn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amueller/patsylearn/downloads","issues_url":"https://api.github.com/repos/amueller/patsylearn/issues{/number}","pulls_url":"https://api.github.com/repos/amueller/patsylearn/pulls{/number}","milestones_url":"https://api.github.com/repos/amueller/patsylearn/milestones{/number}","notifications_url":"https://api.github.com/repos/amueller/patsylearn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amueller/patsylearn/labels{/name}","releases_url":"https://api.github.com/repos/amueller/patsylearn/releases{/id}","deployments_url":"https://api.github.com/repos/amueller/patsylearn/deployments","created_at":"2015-10-06T21:25:24Z","updated_at":"2018-03-01T08:54:24Z","pushed_at":"2016-11-22T22:38:10Z","git_url":"git://github.com/amueller/patsylearn.git","ssh_url":"git@github.com:amueller/patsylearn.git","clone_url":"https://github.com/amueller/patsylearn.git","svn_url":"https://github.com/amueller/patsylearn","homepage":null,"size":21,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":6,"open_issues":6,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amueller/patsylearn/pulls/12"},"html":{"href":"https://github.com/amueller/patsylearn/pull/12"},"issue":{"href":"https://api.github.com/repos/amueller/patsylearn/issues/12"},"comments":{"href":"https://api.github.com/repos/amueller/patsylearn/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/amueller/patsylearn/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/amueller/patsylearn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amueller/patsylearn/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/amueller/patsylearn/statuses/db96f27e385517faa043b98b1b9ee9b1ab998f76"}},"author_association":"NONE"}}
{"actor":{"display_login":"amueller"}}