cleverly.bases.BSpline#
- class cleverly.bases.BSpline(columns: Sequence[str], n_interior_knots: int = 3, degree: int = 3, domains: Mapping[str, tuple[float, float]] | tuple[tuple[str, tuple[float, float]], ...] = (), intercept: bool = True)[source]#
B-splines of each modifier with equally spaced knots on its declared domain.
The knots divide the declared domain into
n_interior_knots + 1equal spans; they are never sample quantiles. The B-splines of one modifier sum to one, so under an intercept the first of them is dropped to keep the design of full rank.- Parameters:
- columnssequence
ofstr The continuous modifiers.
- n_interior_knots
int The number of interior knots per modifier.
- degree
int The polynomial degree, 3 for cubic splines.
- domains
mappingofstrto(float,float),optional Domains carried by the basis itself, which take precedence over the schema’s.
- interceptbool
Whether to prepend the intercept column.
- columnssequence
Methods#
Attributes#
- BSpline.domains: Mapping[str, tuple[float, float]] | tuple[tuple[str, tuple[float, float]], ...] = ()#
- BSpline.max_size#
The declared number of interior knots.