{"action":"created","comment":{"url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/comments/94095329","pull_request_review_id":14625877,"id":94095329,"diff_hunk":"@@ -447,13 +447,19 @@ def predict_cumulative_hazard(self, X):\n         X: a (n,d) covariate numpy array or DataFrame. If a DataFrame, columns\n             can be in any order. If a numpy array, columns must be in the\n             same order as the training data.\n-\n-        Returns the cumulative hazard for the individuals.\n         \"\"\"\n-        v = self.predict_partial_hazard(X)\n-        s_0 = self.baseline_survival_\n-        col = _get_index(X)\n-        return pd.DataFrame(-np.dot(np.log(s_0), v.T), index=self.baseline_survival_.index, columns=col)\n+        if self.strata:","path":"lifelines/fitters/coxph_fitter.py","position":20,"original_position":20,"commit_id":"ab12e4fa2baf73d792baef1d92146230709c31a0","original_commit_id":"ab12e4fa2baf73d792baef1d92146230709c31a0","user":{"login":"CamDavidsonPilon","id":884032,"avatar_url":"https://avatars.githubusercontent.com/u/884032?v=3","gravatar_id":"","url":"https://api.github.com/users/CamDavidsonPilon","html_url":"https://github.com/CamDavidsonPilon","followers_url":"https://api.github.com/users/CamDavidsonPilon/followers","following_url":"https://api.github.com/users/CamDavidsonPilon/following{/other_user}","gists_url":"https://api.github.com/users/CamDavidsonPilon/gists{/gist_id}","starred_url":"https://api.github.com/users/CamDavidsonPilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CamDavidsonPilon/subscriptions","organizations_url":"https://api.github.com/users/CamDavidsonPilon/orgs","repos_url":"https://api.github.com/users/CamDavidsonPilon/repos","events_url":"https://api.github.com/users/CamDavidsonPilon/events{/privacy}","received_events_url":"https://api.github.com/users/CamDavidsonPilon/received_events","type":"User","site_admin":false},"body":"I've moved this logic from the predict_survival function to the more \"higher up\" function","created_at":"2016-12-29T02:03:30Z","updated_at":"2016-12-29T02:03:30Z","html_url":"https://github.com/CamDavidsonPilon/lifelines/pull/268#discussion_r94095329","pull_request_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/268","_links":{"self":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/comments/94095329"},"html":{"href":"https://github.com/CamDavidsonPilon/lifelines/pull/268#discussion_r94095329"},"pull_request":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/268"}}},"pull_request":{"url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/268","id":99611025,"html_url":"https://github.com/CamDavidsonPilon/lifelines/pull/268","diff_url":"https://github.com/CamDavidsonPilon/lifelines/pull/268.diff","patch_url":"https://github.com/CamDavidsonPilon/lifelines/pull/268.patch","issue_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/268","number":268,"state":"open","locked":false,"title":"Unique baseline hazard for each strata","user":{"login":"CamDavidsonPilon","id":884032,"avatar_url":"https://avatars.githubusercontent.com/u/884032?v=3","gravatar_id":"","url":"https://api.github.com/users/CamDavidsonPilon","html_url":"https://github.com/CamDavidsonPilon","followers_url":"https://api.github.com/users/CamDavidsonPilon/followers","following_url":"https://api.github.com/users/CamDavidsonPilon/following{/other_user}","gists_url":"https://api.github.com/users/CamDavidsonPilon/gists{/gist_id}","starred_url":"https://api.github.com/users/CamDavidsonPilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CamDavidsonPilon/subscriptions","organizations_url":"https://api.github.com/users/CamDavidsonPilon/orgs","repos_url":"https://api.github.com/users/CamDavidsonPilon/repos","events_url":"https://api.github.com/users/CamDavidsonPilon/events{/privacy}","received_events_url":"https://api.github.com/users/CamDavidsonPilon/received_events","type":"User","site_admin":false},"body":"New PR to replace #196 \r\n\r\ncc @jstoxrocky and @IvanBarrientos\r\n\r\n","created_at":"2016-12-29T01:58:23Z","updated_at":"2016-12-29T02:03:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"313ddeeb3314fafd83d66fc50078327a9033d380","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/268/commits","review_comments_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/268/comments","review_comment_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/268/comments","statuses_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/statuses/ab12e4fa2baf73d792baef1d92146230709c31a0","head":{"label":"CamDavidsonPilon:unique_baseline_hazard_for_each_strata","ref":"unique_baseline_hazard_for_each_strata","sha":"ab12e4fa2baf73d792baef1d92146230709c31a0","user":{"login":"CamDavidsonPilon","id":884032,"avatar_url":"https://avatars.githubusercontent.com/u/884032?v=3","gravatar_id":"","url":"https://api.github.com/users/CamDavidsonPilon","html_url":"https://github.com/CamDavidsonPilon","followers_url":"https://api.github.com/users/CamDavidsonPilon/followers","following_url":"https://api.github.com/users/CamDavidsonPilon/following{/other_user}","gists_url":"https://api.github.com/users/CamDavidsonPilon/gists{/gist_id}","starred_url":"https://api.github.com/users/CamDavidsonPilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CamDavidsonPilon/subscriptions","organizations_url":"https://api.github.com/users/CamDavidsonPilon/orgs","repos_url":"https://api.github.com/users/CamDavidsonPilon/repos","events_url":"https://api.github.com/users/CamDavidsonPilon/events{/privacy}","received_events_url":"https://api.github.com/users/CamDavidsonPilon/received_events","type":"User","site_admin":false},"repo":{"id":12420595,"name":"lifelines","full_name":"CamDavidsonPilon/lifelines","owner":{"login":"CamDavidsonPilon","id":884032,"avatar_url":"https://avatars.githubusercontent.com/u/884032?v=3","gravatar_id":"","url":"https://api.github.com/users/CamDavidsonPilon","html_url":"https://github.com/CamDavidsonPilon","followers_url":"https://api.github.com/users/CamDavidsonPilon/followers","following_url":"https://api.github.com/users/CamDavidsonPilon/following{/other_user}","gists_url":"https://api.github.com/users/CamDavidsonPilon/gists{/gist_id}","starred_url":"https://api.github.com/users/CamDavidsonPilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CamDavidsonPilon/subscriptions","organizations_url":"https://api.github.com/users/CamDavidsonPilon/orgs","repos_url":"https://api.github.com/users/CamDavidsonPilon/repos","events_url":"https://api.github.com/users/CamDavidsonPilon/events{/privacy}","received_events_url":"https://api.github.com/users/CamDavidsonPilon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CamDavidsonPilon/lifelines","description":"Survival analysis in Python","fork":false,"url":"https://api.github.com/repos/CamDavidsonPilon/lifelines","forks_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/forks","keys_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/teams","hooks_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/hooks","issue_events_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/events{/number}","events_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/events","assignees_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/assignees{/user}","branches_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/branches{/branch}","tags_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/tags","blobs_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/refs{/sha}","trees_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/statuses/{sha}","languages_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/languages","stargazers_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/stargazers","contributors_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/contributors","subscribers_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/subscribers","subscription_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/subscription","commits_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/commits{/sha}","git_commits_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/commits{/sha}","comments_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/comments{/number}","issue_comment_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/comments{/number}","contents_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/contents/{+path}","compare_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/merges","archive_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/downloads","issues_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues{/number}","pulls_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls{/number}","milestones_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/milestones{/number}","notifications_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/labels{/name}","releases_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/releases{/id}","deployments_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/deployments","created_at":"2013-08-28T00:16:42Z","updated_at":"2016-12-28T09:25:58Z","pushed_at":"2016-12-29T02:01:15Z","git_url":"git://github.com/CamDavidsonPilon/lifelines.git","ssh_url":"git@github.com:CamDavidsonPilon/lifelines.git","clone_url":"https://github.com/CamDavidsonPilon/lifelines.git","svn_url":"https://github.com/CamDavidsonPilon/lifelines","homepage":"lifelines.readthedocs.org","size":11172,"stargazers_count":489,"watchers_count":489,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":47,"forks":104,"open_issues":47,"watchers":489,"default_branch":"master"}},"base":{"label":"CamDavidsonPilon:master","ref":"master","sha":"8136156d3753b582aaf3aa5eb48e6b91c570d02c","user":{"login":"CamDavidsonPilon","id":884032,"avatar_url":"https://avatars.githubusercontent.com/u/884032?v=3","gravatar_id":"","url":"https://api.github.com/users/CamDavidsonPilon","html_url":"https://github.com/CamDavidsonPilon","followers_url":"https://api.github.com/users/CamDavidsonPilon/followers","following_url":"https://api.github.com/users/CamDavidsonPilon/following{/other_user}","gists_url":"https://api.github.com/users/CamDavidsonPilon/gists{/gist_id}","starred_url":"https://api.github.com/users/CamDavidsonPilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CamDavidsonPilon/subscriptions","organizations_url":"https://api.github.com/users/CamDavidsonPilon/orgs","repos_url":"https://api.github.com/users/CamDavidsonPilon/repos","events_url":"https://api.github.com/users/CamDavidsonPilon/events{/privacy}","received_events_url":"https://api.github.com/users/CamDavidsonPilon/received_events","type":"User","site_admin":false},"repo":{"id":12420595,"name":"lifelines","full_name":"CamDavidsonPilon/lifelines","owner":{"login":"CamDavidsonPilon","id":884032,"avatar_url":"https://avatars.githubusercontent.com/u/884032?v=3","gravatar_id":"","url":"https://api.github.com/users/CamDavidsonPilon","html_url":"https://github.com/CamDavidsonPilon","followers_url":"https://api.github.com/users/CamDavidsonPilon/followers","following_url":"https://api.github.com/users/CamDavidsonPilon/following{/other_user}","gists_url":"https://api.github.com/users/CamDavidsonPilon/gists{/gist_id}","starred_url":"https://api.github.com/users/CamDavidsonPilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CamDavidsonPilon/subscriptions","organizations_url":"https://api.github.com/users/CamDavidsonPilon/orgs","repos_url":"https://api.github.com/users/CamDavidsonPilon/repos","events_url":"https://api.github.com/users/CamDavidsonPilon/events{/privacy}","received_events_url":"https://api.github.com/users/CamDavidsonPilon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CamDavidsonPilon/lifelines","description":"Survival analysis in Python","fork":false,"url":"https://api.github.com/repos/CamDavidsonPilon/lifelines","forks_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/forks","keys_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/teams","hooks_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/hooks","issue_events_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/events{/number}","events_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/events","assignees_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/assignees{/user}","branches_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/branches{/branch}","tags_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/tags","blobs_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/refs{/sha}","trees_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/statuses/{sha}","languages_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/languages","stargazers_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/stargazers","contributors_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/contributors","subscribers_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/subscribers","subscription_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/subscription","commits_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/commits{/sha}","git_commits_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/git/commits{/sha}","comments_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/comments{/number}","issue_comment_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/comments{/number}","contents_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/contents/{+path}","compare_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/merges","archive_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/downloads","issues_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues{/number}","pulls_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls{/number}","milestones_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/milestones{/number}","notifications_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/labels{/name}","releases_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/releases{/id}","deployments_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/deployments","created_at":"2013-08-28T00:16:42Z","updated_at":"2016-12-28T09:25:58Z","pushed_at":"2016-12-29T02:01:15Z","git_url":"git://github.com/CamDavidsonPilon/lifelines.git","ssh_url":"git@github.com:CamDavidsonPilon/lifelines.git","clone_url":"https://github.com/CamDavidsonPilon/lifelines.git","svn_url":"https://github.com/CamDavidsonPilon/lifelines","homepage":"lifelines.readthedocs.org","size":11172,"stargazers_count":489,"watchers_count":489,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":47,"forks":104,"open_issues":47,"watchers":489,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/268"},"html":{"href":"https://github.com/CamDavidsonPilon/lifelines/pull/268"},"issue":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/268"},"comments":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/268/comments"},"review_comments":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/268/comments"},"review_comment":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/pulls/268/commits"},"statuses":{"href":"https://api.github.com/repos/CamDavidsonPilon/lifelines/statuses/ab12e4fa2baf73d792baef1d92146230709c31a0"}}}}
{"actor":{"display_login":"CamDavidsonPilon"}}