statsmodels.gam.smooth_basis.CyclicCubicSplines¶
- class statsmodels.gam.smooth_basis.CyclicCubicSplines(x, df, constraints=None, variable_names=None)[source]¶
additive smooth components using cyclic cubic regression splines
This spline basis is the same as in patsy.
- Parameters:
x (array_like, 1-D or 2-D) – underlying explanatory variable for smooth terms. If 2-dimensional, then observations should be in rows and explanatory variables in columns.
df (int) – numer of basis functions or degrees of freedom
constraints ({None, str, array}) – Constraints are used to transform the basis functions to satisfy those constraints.
variable_names ({list[str], None}) – The names for the underlying explanatory variables, x used in for creating the column and parameter names for the basis functions. If
xis a pandas object, then the names will be taken from it.
Methods
transform(x_new)create the spline basis for new observations