The highly adaptive lasso fitting function. This function takes a matrix of predictor values
(which can be binary or continuous) and converts it into a set of indicator basis functions
that perfectly fit the data. The function then uses cross-validated lasso (via the glmnet
package) to select basis functions. The resulting fit is called the highly adaptive lasso.
The process of creating the indicator basis functions can be extremely time and memory intensive
as it involves creating n(2^d - 1) basis functions, where n is the number of observations
and d the number of covariates. The function also must subsequently search over basis functions
for those that are duplicated and store the results. Future implementations will attempt to
streamline this process to the largest extent possible; however, for the time being implementing
with values of n and d such that n(2^d - 1) > 1e7 is not recommended.
1 2 3 |
Y |
A |
X |
A |
newX |
Optional |
verbose |
A |
obsWeights |
Optional |
nfolds |
Number of CV folds passed to |
nlambda |
Number of lambda values to search across in |
useMin |
Option passed to |
debug |
For benchmarking. Setting to |
parallel |
A boolean indicating whether to use a parallel backend, if possible |
... |
Not currently used |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.