Skip to content

Instantly share code, notes, and snippets.

@a-agmon
Last active May 3, 2020 05:18
Show Gist options
  • Save a-agmon/f25edbeaf052297ac4914f7f554dce06 to your computer and use it in GitHub Desktop.
Save a-agmon/f25edbeaf052297ac4914f7f554dce06 to your computer and use it in GitHub Desktop.
from lifelines import KaplanMeierFitter
kmf_breq = KaplanMeierFitter()
kmf_breq.fit(df['days_with_bad_req'], event_observed=df['event'])
ax = kmf_breq.plot()
plt.rcParams['figure.figsize'] = [6, 5]
x = set_grid_and_ticks(ax, 21).set_title("Days in which requests by device or address are non-human")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment