Compute regression function and derivative estimates based on polynomial basis lasso with penalty parameter chosen by cross validation (CV).
fit_lasso_poly(X, y, degree, lambda = NULL)
List containing: A function "fit" which takes matrix input of the same width as X, and returns a vector of y-predictions. A scalar "lambda" the tuning parameter.
matrix of covariates.
vector of responses.
maximum degree of polynomial terms.
optional scalar tuning parameter, if "NULL" chosen via cross-validation.