BwUniCluster2.0/Software/R/Glmnet: Difference between revisions
< BwUniCluster2.0 | Software | R
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 29: | Line 29: | ||
> print(fit) |
> print(fit) |
||
</pre> |
</pre> |
||
---- |
|||
[[Category:BwUniCluster]] |
|||
[[Category:BwUniCluster_2.0]] |
Revision as of 13:11, 22 June 2022
General information
glmnet is a R library for lasso and elastic-net regularized generalized linear models
Installation instructions
Consider starting an interactive job for compiling. Copy and paste the following to your shell.
# Load the R software module, e.g. module load math/R/4.1.2 # Prepare .R directory (if it does not already exists) mkdir -p ~/.R # Write the following environment variables to Makevars echo "CXX14=icpc" >> ~/.R/Makevars echo "CXX14FLAGS=-O3 -fPIC -std=c++14 -axCORE-AVX512,CORE-AVX2,AVX -xSSE4.2 -fp-model strict -qopenmp" >> ~/.R/Makevars # Install the glmnet package from within R session R -q > install.packages("glmnet", dependencies=TRUE) # Run a quick test > library(glmnet) > data(QuickStartExample) > x <- QuickStartExample$x > y <- QuickStartExample$y > fit <- glmnet(x, y) > print(fit)