xyz_regression {xyz} | R Documentation |
Elasticnet with interactions (glmnet)
xyz_regression(X, Y, lambdas = NULL, n_lambda = 10, alpha = 0.9, L = 10, standardize = TRUE, standardize_response = TRUE)
X |
A matrix. |
Y |
A vector. |
lambdas |
A vector of decreasing real numbers containing user specified values of lambda. |
n_lambda |
A natural number indicating how long the path of lambdas should be. |
alpha |
A real number between 0 and 1 (the elastic net parameter) |
L |
An integer indicating how many projection steps are performed. |
standardize |
A boolean indicating if X should be scaled and centered. |
standardize_response |
A boolean indicating if Y should be scaled and centered. |
N
strongest interactions (of type type
) between X
and Y
after L
projections.
G. Thanei, N. Meinshausen and R. Shah (2016). The xyz algorithm for fast interaction search in high-dimensional data. <https://arxiv.org/pdf/1610.05108v1.pdf>
n<-300 p<-1000 #build matrix of predictors X<-matrix(rnorm(n*p),n,p) #build a main effect and an interaction into Y Y<-4*X[,1]*X[,2]-5*X[,4]+rnorm(n) result<-xyz_regression(X,Y,n_lambda=10,alpha=0.9,L=10) #print the result print(result) #plot the result plot(result)