regfun_grad {incidental} | R Documentation |
This function computes regularization penalty term gradient based on the betas and difference order.
regfun_grad(beta, regularization_order = 2)
beta |
spline parameter vector length num_params |
regularization_order |
An integer (typically 0, 1, 2), indicating differencing order for L2 regularization of spline parameters. Default is 2 for second derivative penalty. |
scalar regularization value