Basis.new_linear()#
- classmethod Basis.new_linear(value, name=None, xname=None, add_intercept=False)[source]#
Create a linear basis (design matrix) from input values.
- Parameters:
value (
Var|Node|Array) – Input variable or raw array used to construct the design matrix.name (
str|None, default:None) – Optional name for the basis.xname (
str|None, default:None) – Name for the observation variable whenvalueis a raw array.add_intercept (
bool, default:False) – IfTrue, adds an intercept column of ones as the first column of the design matrix.
- Returns:
A
Basisinstance that produces a (n_obs, n_features)design matrix.