Skip to content

Instantly share code, notes, and snippets.

View akelleh's full-sized avatar

Adam Kelleher akelleh

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
sns.lineplot(data=causal_df,
x='title_length',
y='click_through_rate'); pp.ylim(0, 0.1)
causal_df.groupby('title_length') \
.mean() \
.reset_index() \
.plot(x='title_length',
y='click_through_rate'); pp.ylim(0, 0.1)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
causal_df = df.causal.do('title_length',
method='weighting',
variable_types={'title_length': 'd',
'click_through_rate': 'c',
'author': 'd'},
outcome='click_through_rate',
common_causes=['author'])
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.