patsy intercept term in cubic splines

24 views
Skip to first unread message

Hovnatan Karapetyan

unread,
Jun 17, 2017, 7:53:05 AM6/17/17
to PyData
Hi,

I'm trying to understand cubic spline generation in patsy. As far as I can see from the output of 

import numpy as np
from patsy import dmatrix

x = np.linspace(0., 1., 100)
y1 = dmatrix("bs(x, df=6, degree=3, include_intercept=True)", {"x": x})
print(y1)
y2 = dmatrix("bs(x, df=6, degree=3, include_intercept=False)", {"x": x})
print(y2)

the y1 (with intercept) and y2 (without intercept) are the same. Is there something I am missing?

Thanks!
Hovnatan

Nathaniel Smith

unread,
Jun 17, 2017, 3:22:17 PM6/17/17
to pyd...@googlegroups.com
Addressed here: https://github.com/pydata/patsy/issues/108
> --
> You received this message because you are subscribed to the Google Groups
> "PyData" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pydata+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Nathaniel J. Smith -- https://vorpus.org
Reply all
Reply to author
Forward
0 new messages