What's the cleanest way to perform ridgeless minimum norm interpolation (OLS with pseudoinverse when k>n) in R? Afaict, the dgelsy subroutine from LAPACK is the standard way to do this (it is what sklearn's LinearRegression uses). Does calling glmnet with lambda=0 do it? #rstats
4
8
gpt4 wrote some undebuggable fortran f90 code. Have never used LAPACK directly in R; got any examples / rcppEigen alternatives @eddelbuettel ?
1
Replying to @Apoorva__Lal
You can follow the R sources directly which will provide the usual solid and tested (if terse) guides. But usually life is too short and I just rely on (Rcpp)Armadillo doing the BLAS/LAPACK interfacing for me.

Sep 5, 2023 · 3:32 PM UTC

2