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:
xarray_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.

dfsequence of int

number of basis functions or degrees of freedom

constraintsNone, str, or ndarray, optional

Constraints are used to transform the basis functions to satisfy those constraints.

variable_nameslist of str, optional

The names for the underlying explanatory variables, x used in for creating the column and parameter names for the basis functions. If x is a pandas object, then the names will be taken from it.

Methods

transform(x_new)

Create the spline basis for new observations

Methods

transform(x_new)

Create the spline basis for new observations