class_docstr: cr(x, df=None, knots=None, lower_bound=None, upper_bound=None, constraints=None)
  
  Generates a natural cubic spline basis for ``x``
  (with the option of absorbing centering or more general parameters
  constraints), allowing non-linear fits. The usual usage is something like::
  
    y ~ 1 + cr(x, df=5, constraints='center')
  
  to fit ``y`` as a smooth function of ``x``, with 5 degrees of freedom
  given to the smooth, and centering constraint absorbed in
  the resulting design matrix. Note that in this example, due to the centering
  constraint, 6 knots will get computed from the input data ``x``
  to achieve 5 degrees of freedom.
  
  
  .. note:: This function reproduce the cubic regression splines 'cr' and 'cs'
    as implemented in the R package 'mgcv' (GAM modelling).
class_docstr_tok: ["cr","(","x",",","df=None",",","knots=None",",","lower_bound=None",",","upper_bound=None",",","constraints=None",")","Generates","a","natural","cubic","spline","basis","for","``","x","``","(","with","the","option","of","absorbing","centering","or","more","general","parameters","constraints",")",",","allowing","non-linear","fits",".","The","usual","usage","is","something","like",":",":","y","~","1","+","cr","(","x",",","df=5",",","constraints='center","'",")","to","fit","``","y","``","as","a","smooth","function","of","``","x","``",",","with","5","degrees","of","freedom","given","to","the","smooth",",","and","centering","constraint","absorbed","in","the","resulting","design","matrix",".","Note","that","in","this","example",",","due","to","the","centering","constraint",",","6","knots","will","get","computed","from","the","input","data","``","x","``","to","achieve","5","degrees","of","freedom",".","..","note",":",":","This","function","reproduce","the","cubic","regression","splines","'cr","'","and","'cs'","as","implemented","in","the","R","package","'mgcv","'","(","GAM","modelling",")","."]
code: def __init__(self):
      CubicRegressionSpline.__init__(self, name="cr", cyclic=False)
  
imports: import numpy
  from patsy.util import have_pandas, atleast_2d_column_default, no_pickling, assert_no_pickling, safe_string_eq
  from patsy.state import stateful_transform
label_desc: Use image node_id 1 to create a new CR object from inherited base classes: CubicRegressionSpline with example: obj = CR()