Skip to content

Instantly share code, notes, and snippets.

@eamartin
Created May 29, 2014 12:40
Show Gist options
  • Save eamartin/4578c77f67cdae4f3a58 to your computer and use it in GitHub Desktop.
Save eamartin/4578c77f67cdae4f3a58 to your computer and use it in GitHub Desktop.
def predict_expectation(aaf, covariates):
sfs = aaf.predict_survival_function(covariates)
xvals = sfs.index.values
return simps(sfs.values, xvals, axis=0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment