Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
m5000_8
coefs = {}
for i in range(6, 19):
train_new = train.copy()
train_new['bin'] = ((resc.predict(Xc) < (i + 2)) & (resc.predict(Xc) >= i)).astype(int)
Xcb = train_new[train_new.bin == 1][['speed', 'thickness', 'delta']]
Xcb = sm.add_constant(Xcb)
Ycb = train_new[train_new.bin == 1][['I']]
modcb = sm.OLS(Ycb, Xcb)
rescb = modcb.fit()
coefs[i] = rescb.params['speed']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.