Skip to contents

OLS solver that falls back to an optimisation if ncol(X) is huge Also supports LASSO via optimisation

Usage

fast_ols(X, Y, weight = NULL, lambda = 0, max_iterations = 300)

Arguments

X

data matrix

Y

response vector

weight

weight vector (default: NULL)

lambda

LASSO regularisation (default: 0)

max_iterations

if ncol(X) is huge, then ols is replaced with optimisation (default:300)

Value

coefficient vector