concave#

pygam.penalties.concave(n, coef)[source]#

Builds a penalty matrix for P-Splines with continuous features. Penalizes violation of a concave feature function.

Parameters:
nint

number of splines

coefarray-like

coefficients of the feature function

Returns:
penalty matrixsparse csc matrix of shape (n,n)