#TenFoldCVTimesTen_DrugBank.R #Requires the R package 'glmnet' print("Reading in datasets...") #Specify filepath in quotes filepath <- "" #Read in DrugBank CSV file as a data frame dockScores <- read.csv(paste(filepath,"N560_p555_DB_Matrix.csv",sep=""),header=T) #Read in ADR group response matrix Y <- read.csv(paste(filepath,"N560_p10_DrugADR_Matrix.csv",sep=""),header=T) print("...finished!") print("Generating the design matrix...") #Generate the design matrix dataMatrix <- matrix(nrow=nrow(dockScores),ncol=(ncol(dockScores)-4)) i <- 0 while(i1) chosenOneIndx <- chosenOneIndx[[1]] tenCVResultsMatrix[i,1] <- lambdaMinVect[[chosenOneIndx]] tenCVResultsMatrix[i,2] <- cvloVect[[chosenOneIndx]] tenCVResultsMatrix[i,3] <- cvmVect[[chosenOneIndx]] tenCVResultsMatrix[i,4] <- cvupVect[[chosenOneIndx]] tenCVResultsMatrix[i,5] <- nzeroVect[[chosenOneIndx]] betaVect <- vector(length=length(betas[chosenOneIndx,])) nn <- 0;while(nn