Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

IndexError: index 200 is out of bounds for axis 0 with size 2 #475

Open
krpwn opened this issue Jul 23, 2020 · 0 comments
Open

IndexError: index 200 is out of bounds for axis 0 with size 2 #475

krpwn opened this issue Jul 23, 2020 · 0 comments

Comments

@krpwn
Copy link

krpwn commented Jul 23, 2020

I have been doing the codes as -

df=pd.DataFrame(adata)
df.head()

xq=adata['batch size'].values.reshape(-1,1)
yq=adata['Price'].values.reshape(-1,1)

mod = smf.quantreg('yq ~ xq', df)
res = mod.fit(q=.5)
print(res.summary())

quantiles = [.05, .25, .50, .75, .95]
def fit_model(q):
res = mod.fit(q=q)
return [q, res.params['Intercept'], res.params[xq]] + res.conf_int().ix[xq].tolist()
models = [fit_model(xq) for xq in quantiles]

However am getting the error as IndexError: index 200 is out of bounds for axis 0 with size 2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant