Description Usage Arguments Value
View source: R/sparsereg3D.ncv.r
Model Evaluation with Nested Cross-Validation
1 2 |
sparse.reg |
output from |
lambda |
vector of regularization parameter values for lasso regression |
step |
logical. If TRUE stepwise procedure will be used when fitting OLS model |
ols |
logical. If TRUE model will be fitted with OLS insted of using lasso |
all |
logical. If TRUE a detailed output will be prepared. |
lambda.1se |
logical. If TRUE one sigma lambda rule will be used (largest lambda value with cv.err less than or equal to min(cv.err)+ SE). |
w |
weighted parameter (positive number) that controls the level of using observations from deeper layers as less informative. General weighted model is $w=1/(1+w*depth)$. This option is still under development, so it is not included in the function for model selection. |
alpha |
ElasticNet parameter. see glmnet function in glmnet package. Default is alpha = 1 indicating that the lasso penalty is used. |
seed |
random number generator |
List of objects including:
RMSE
: Root Mean Squared Error
R squared
: Coefficient of determination
Accuracy (if all = TRUE
). Accuracy measures computed for each step in outer cross-valudation loop within nested cross-validation.
data.prediction (if all = TRUE
) Data frame containing design matrix extended with predictions obtain through nested cross-validation.
models (if all = TRUE
) list of length nfolds
containing models that corresponds to each step in outer cross-valudation loop within nested cross-validation.
@keywords Model evaluation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.