{"action":"created","comment":{"url":"https://api.github.com/repos/cognoma/machine-learning/pulls/comments/79869402","id":79869402,"diff_hunk":"@@ -56,26 +56,34 @@ def classify(sample_id, mutation_status, **kwargs):\n     pipeline.fit(X=X_train, y=y_train)\n     #cv_score_df = grid_scores_to_df(clf_grid.grid_scores_)\n     \n-    obs_df['predicted_status'] = pipeline.predict(X)\n-    obs_df['predicted_score'] = pipeline.decision_function(X)\n-    #obs_df['predicted_prob'] = pipeline.predict_proba(X)\n-        \n-    is_testing = obs_df.testing.astype(bool)\n-    y_pred_train = obs_df.predicted_score[~is_testing]\n-    y_pred_test = obs_df.predicted_score[is_testing]\n+    predict_df = pd.DataFrame.from_items([\n+        ('sample_id', X_whole.index),\n+        ('predicted_status', pipeline.predict(X_whole)),\n+        ('predicted_score', pipeline.decision_function(X_whole)),\n+        ('predicted_prob', pipeline.predict_proba(X_whole)[:, 1]),","path":"cognoml/analysis.py","position":62,"original_position":30,"commit_id":"bb764c75b2692f0a5ca393710acf8ded353c98e8","original_commit_id":"a050db035b25db8b4739b6e2574c0eec574288f2","user":{"login":"dhimmel","id":1117703,"avatar_url":"https://avatars.githubusercontent.com/u/1117703?v=3","gravatar_id":"","url":"https://api.github.com/users/dhimmel","html_url":"https://github.com/dhimmel","followers_url":"https://api.github.com/users/dhimmel/followers","following_url":"https://api.github.com/users/dhimmel/following{/other_user}","gists_url":"https://api.github.com/users/dhimmel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhimmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhimmel/subscriptions","organizations_url":"https://api.github.com/users/dhimmel/orgs","repos_url":"https://api.github.com/users/dhimmel/repos","events_url":"https://api.github.com/users/dhimmel/events{/privacy}","received_events_url":"https://api.github.com/users/dhimmel/received_events","type":"User","site_admin":false},"body":"@yl565 what's the best way to see if a pipeline supports `predict_proba`? We can upgrade to sklearn 18 once that's released, if that will make things easier.","created_at":"2016-09-21T16:00:51Z","updated_at":"2016-09-21T16:00:51Z","html_url":"https://github.com/cognoma/machine-learning/pull/51#discussion_r79869402","pull_request_url":"https://api.github.com/repos/cognoma/machine-learning/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/comments/79869402"},"html":{"href":"https://github.com/cognoma/machine-learning/pull/51#discussion_r79869402"},"pull_request":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/cognoma/machine-learning/pulls/51","id":86010143,"html_url":"https://github.com/cognoma/machine-learning/pull/51","diff_url":"https://github.com/cognoma/machine-learning/pull/51.diff","patch_url":"https://github.com/cognoma/machine-learning/pull/51.patch","issue_url":"https://api.github.com/repos/cognoma/machine-learning/issues/51","number":51,"state":"open","locked":false,"title":"[WIP] Create the cognoml package to implement an MVP API","user":{"login":"dhimmel","id":1117703,"avatar_url":"https://avatars.githubusercontent.com/u/1117703?v=3","gravatar_id":"","url":"https://api.github.com/users/dhimmel","html_url":"https://github.com/dhimmel","followers_url":"https://api.github.com/users/dhimmel/followers","following_url":"https://api.github.com/users/dhimmel/following{/other_user}","gists_url":"https://api.github.com/users/dhimmel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhimmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhimmel/subscriptions","organizations_url":"https://api.github.com/users/dhimmel/orgs","repos_url":"https://api.github.com/users/dhimmel/repos","events_url":"https://api.github.com/users/dhimmel/events{/privacy}","received_events_url":"https://api.github.com/users/dhimmel/received_events","type":"User","site_admin":false},"body":"I'll remove WIP (work in progress) when this pull request is complete.\r\n\r\nSee https://github.com/cognoma/machine-learning/issues/31 for API design discussion.\r\n\r\nSee https://github.com/cognoma/machine-learning/issues/44 for MVP (minimal viable product) feature inclusion decisions.","created_at":"2016-09-20T16:26:11Z","updated_at":"2016-09-21T16:00:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce866e4262ef2cc84a567c0de605686d73b4c0a9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cognoma/machine-learning/pulls/51/commits","review_comments_url":"https://api.github.com/repos/cognoma/machine-learning/pulls/51/comments","review_comment_url":"https://api.github.com/repos/cognoma/machine-learning/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cognoma/machine-learning/issues/51/comments","statuses_url":"https://api.github.com/repos/cognoma/machine-learning/statuses/bb764c75b2692f0a5ca393710acf8ded353c98e8","head":{"label":"dhimmel:package","ref":"package","sha":"bb764c75b2692f0a5ca393710acf8ded353c98e8","user":{"login":"dhimmel","id":1117703,"avatar_url":"https://avatars.githubusercontent.com/u/1117703?v=3","gravatar_id":"","url":"https://api.github.com/users/dhimmel","html_url":"https://github.com/dhimmel","followers_url":"https://api.github.com/users/dhimmel/followers","following_url":"https://api.github.com/users/dhimmel/following{/other_user}","gists_url":"https://api.github.com/users/dhimmel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhimmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhimmel/subscriptions","organizations_url":"https://api.github.com/users/dhimmel/orgs","repos_url":"https://api.github.com/users/dhimmel/repos","events_url":"https://api.github.com/users/dhimmel/events{/privacy}","received_events_url":"https://api.github.com/users/dhimmel/received_events","type":"User","site_admin":false},"repo":{"id":64316443,"name":"machine-learning","full_name":"dhimmel/machine-learning","owner":{"login":"dhimmel","id":1117703,"avatar_url":"https://avatars.githubusercontent.com/u/1117703?v=3","gravatar_id":"","url":"https://api.github.com/users/dhimmel","html_url":"https://github.com/dhimmel","followers_url":"https://api.github.com/users/dhimmel/followers","following_url":"https://api.github.com/users/dhimmel/following{/other_user}","gists_url":"https://api.github.com/users/dhimmel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhimmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhimmel/subscriptions","organizations_url":"https://api.github.com/users/dhimmel/orgs","repos_url":"https://api.github.com/users/dhimmel/repos","events_url":"https://api.github.com/users/dhimmel/events{/privacy}","received_events_url":"https://api.github.com/users/dhimmel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhimmel/machine-learning","description":"Machine learning for Project Cognoma","fork":true,"url":"https://api.github.com/repos/dhimmel/machine-learning","forks_url":"https://api.github.com/repos/dhimmel/machine-learning/forks","keys_url":"https://api.github.com/repos/dhimmel/machine-learning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhimmel/machine-learning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhimmel/machine-learning/teams","hooks_url":"https://api.github.com/repos/dhimmel/machine-learning/hooks","issue_events_url":"https://api.github.com/repos/dhimmel/machine-learning/issues/events{/number}","events_url":"https://api.github.com/repos/dhimmel/machine-learning/events","assignees_url":"https://api.github.com/repos/dhimmel/machine-learning/assignees{/user}","branches_url":"https://api.github.com/repos/dhimmel/machine-learning/branches{/branch}","tags_url":"https://api.github.com/repos/dhimmel/machine-learning/tags","blobs_url":"https://api.github.com/repos/dhimmel/machine-learning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhimmel/machine-learning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhimmel/machine-learning/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhimmel/machine-learning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhimmel/machine-learning/statuses/{sha}","languages_url":"https://api.github.com/repos/dhimmel/machine-learning/languages","stargazers_url":"https://api.github.com/repos/dhimmel/machine-learning/stargazers","contributors_url":"https://api.github.com/repos/dhimmel/machine-learning/contributors","subscribers_url":"https://api.github.com/repos/dhimmel/machine-learning/subscribers","subscription_url":"https://api.github.com/repos/dhimmel/machine-learning/subscription","commits_url":"https://api.github.com/repos/dhimmel/machine-learning/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhimmel/machine-learning/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhimmel/machine-learning/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhimmel/machine-learning/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhimmel/machine-learning/contents/{+path}","compare_url":"https://api.github.com/repos/dhimmel/machine-learning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhimmel/machine-learning/merges","archive_url":"https://api.github.com/repos/dhimmel/machine-learning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhimmel/machine-learning/downloads","issues_url":"https://api.github.com/repos/dhimmel/machine-learning/issues{/number}","pulls_url":"https://api.github.com/repos/dhimmel/machine-learning/pulls{/number}","milestones_url":"https://api.github.com/repos/dhimmel/machine-learning/milestones{/number}","notifications_url":"https://api.github.com/repos/dhimmel/machine-learning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhimmel/machine-learning/labels{/name}","releases_url":"https://api.github.com/repos/dhimmel/machine-learning/releases{/id}","deployments_url":"https://api.github.com/repos/dhimmel/machine-learning/deployments","created_at":"2016-07-27T14:41:39Z","updated_at":"2016-07-27T14:41:40Z","pushed_at":"2016-09-21T15:35:25Z","git_url":"git://github.com/dhimmel/machine-learning.git","ssh_url":"git@github.com:dhimmel/machine-learning.git","clone_url":"https://github.com/dhimmel/machine-learning.git","svn_url":"https://github.com/dhimmel/machine-learning","homepage":null,"size":3245,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cognoma:master","ref":"master","sha":"6f5eb62ec890bfd58eae92a76a298fdf408cafe1","user":{"login":"cognoma","id":20342585,"avatar_url":"https://avatars.githubusercontent.com/u/20342585?v=3","gravatar_id":"","url":"https://api.github.com/users/cognoma","html_url":"https://github.com/cognoma","followers_url":"https://api.github.com/users/cognoma/followers","following_url":"https://api.github.com/users/cognoma/following{/other_user}","gists_url":"https://api.github.com/users/cognoma/gists{/gist_id}","starred_url":"https://api.github.com/users/cognoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cognoma/subscriptions","organizations_url":"https://api.github.com/users/cognoma/orgs","repos_url":"https://api.github.com/users/cognoma/repos","events_url":"https://api.github.com/users/cognoma/events{/privacy}","received_events_url":"https://api.github.com/users/cognoma/received_events","type":"Organization","site_admin":false},"repo":{"id":63727862,"name":"machine-learning","full_name":"cognoma/machine-learning","owner":{"login":"cognoma","id":20342585,"avatar_url":"https://avatars.githubusercontent.com/u/20342585?v=3","gravatar_id":"","url":"https://api.github.com/users/cognoma","html_url":"https://github.com/cognoma","followers_url":"https://api.github.com/users/cognoma/followers","following_url":"https://api.github.com/users/cognoma/following{/other_user}","gists_url":"https://api.github.com/users/cognoma/gists{/gist_id}","starred_url":"https://api.github.com/users/cognoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cognoma/subscriptions","organizations_url":"https://api.github.com/users/cognoma/orgs","repos_url":"https://api.github.com/users/cognoma/repos","events_url":"https://api.github.com/users/cognoma/events{/privacy}","received_events_url":"https://api.github.com/users/cognoma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cognoma/machine-learning","description":"Machine learning for Project Cognoma","fork":false,"url":"https://api.github.com/repos/cognoma/machine-learning","forks_url":"https://api.github.com/repos/cognoma/machine-learning/forks","keys_url":"https://api.github.com/repos/cognoma/machine-learning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cognoma/machine-learning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cognoma/machine-learning/teams","hooks_url":"https://api.github.com/repos/cognoma/machine-learning/hooks","issue_events_url":"https://api.github.com/repos/cognoma/machine-learning/issues/events{/number}","events_url":"https://api.github.com/repos/cognoma/machine-learning/events","assignees_url":"https://api.github.com/repos/cognoma/machine-learning/assignees{/user}","branches_url":"https://api.github.com/repos/cognoma/machine-learning/branches{/branch}","tags_url":"https://api.github.com/repos/cognoma/machine-learning/tags","blobs_url":"https://api.github.com/repos/cognoma/machine-learning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cognoma/machine-learning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cognoma/machine-learning/git/refs{/sha}","trees_url":"https://api.github.com/repos/cognoma/machine-learning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cognoma/machine-learning/statuses/{sha}","languages_url":"https://api.github.com/repos/cognoma/machine-learning/languages","stargazers_url":"https://api.github.com/repos/cognoma/machine-learning/stargazers","contributors_url":"https://api.github.com/repos/cognoma/machine-learning/contributors","subscribers_url":"https://api.github.com/repos/cognoma/machine-learning/subscribers","subscription_url":"https://api.github.com/repos/cognoma/machine-learning/subscription","commits_url":"https://api.github.com/repos/cognoma/machine-learning/commits{/sha}","git_commits_url":"https://api.github.com/repos/cognoma/machine-learning/git/commits{/sha}","comments_url":"https://api.github.com/repos/cognoma/machine-learning/comments{/number}","issue_comment_url":"https://api.github.com/repos/cognoma/machine-learning/issues/comments{/number}","contents_url":"https://api.github.com/repos/cognoma/machine-learning/contents/{+path}","compare_url":"https://api.github.com/repos/cognoma/machine-learning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cognoma/machine-learning/merges","archive_url":"https://api.github.com/repos/cognoma/machine-learning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cognoma/machine-learning/downloads","issues_url":"https://api.github.com/repos/cognoma/machine-learning/issues{/number}","pulls_url":"https://api.github.com/repos/cognoma/machine-learning/pulls{/number}","milestones_url":"https://api.github.com/repos/cognoma/machine-learning/milestones{/number}","notifications_url":"https://api.github.com/repos/cognoma/machine-learning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cognoma/machine-learning/labels{/name}","releases_url":"https://api.github.com/repos/cognoma/machine-learning/releases{/id}","deployments_url":"https://api.github.com/repos/cognoma/machine-learning/deployments","created_at":"2016-07-19T21:03:15Z","updated_at":"2016-09-06T23:31:45Z","pushed_at":"2016-09-21T15:35:25Z","git_url":"git://github.com/cognoma/machine-learning.git","ssh_url":"git@github.com:cognoma/machine-learning.git","clone_url":"https://github.com/cognoma/machine-learning.git","svn_url":"https://github.com/cognoma/machine-learning","homepage":null,"size":6115,"stargazers_count":3,"watchers_count":3,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":21,"forks":20,"open_issues":21,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/51"},"html":{"href":"https://github.com/cognoma/machine-learning/pull/51"},"issue":{"href":"https://api.github.com/repos/cognoma/machine-learning/issues/51"},"comments":{"href":"https://api.github.com/repos/cognoma/machine-learning/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/cognoma/machine-learning/statuses/bb764c75b2692f0a5ca393710acf8ded353c98e8"}}}}
{"actor":{"display_login":"dhimmel"}}