Is there any package in R that contains algorithm for feature selection using Gram-Schmidt orthogonalization?
See Appendix A here, for a Matlab code implementation of Forward selection with Gram-Schmidt orthogonalization. If nothing else is found, at least you could rewrite it in R.
The "far" package has it.
Use Rseek. It's the second thing that came up in a search.
See "A New Method for Generating the Design Matrix of a Linear Regression Model" by Adel M. Hallawa and Abdul-Mordy H. Azzam in The Egyptian Statistical Journal, ISSR, Cairo University
My Name: Mohamed Ali
My phone: 002-0113300093
n is number of observations, p is number of regressors
n = 10 p = 3
Generate a set of p, (n×1) vectors ~ N(0,1)
v1 <- array (c(rnorm(n, mean = 0, sd = 1))) v2 <- array (c(rnorm(n, mean = 0, sd = 1))) v3 <- array (c(rnorm(n, mean = 0, sd = 1)))
define v as a matrix, its columns is the generated p vectors
and make the matrix H equal v
v<-matrix(c(v1,v2,v3), nrow = n, ncol = p) H<-matrix(c(v), nrow = n, ncol = p)
orthogonalize the p vectors by Gram-Schmidt process
numerator1 <- sum(H[,1]*v[,2]) denominator1 <- sum(H[,1]*H[,1]) proj1 <- (numerator1 / denominator1) * H[,1]
H[,2] <- v2 - (proj1)
numerator2 <- sum(H[,2]*v[,3]) denominator2 <- sum(H[,2]*H[,2]) proj2 <- (numerator2 / denominator2) * H[,2] H[,3] <- v3 - (proj1) - (proj2)
cor(H[,1],H[,2])
define R as a correlation matrix
R<-matrix(c(1,0.2,0.2, 0.2,1,0.2, 0.2,0.2,1), nrow = p, ncol = p, byrow=TRUE)
Calc the eigenvalues and normalized eigenvectots of R
eigen(R) eigen(R)$values eigen(R)$vector