MGMT6963-Lab6

— title: “Lab6” output: html_document — #Introduction to Models. This is the start of our efforts to *predict* something, and like the other efforts this one is going to be quite simple at first. We are going to start with a simple example that provides a naive model. “`{r} #This creates a train and test set. train_s<- as.data.frame(matrix(rnorm(40, mean=20, sd=5), nrow=10, ncol=4)) test_s<- as.data.frame(matrix(rnorm(40, mean=20, sd=5), nrow=10, ncol=4)) #This adds a key and a dependent variable of interest using the column bind (cbind) train_s<-cbind((1:10), train_s, c(0,1,0,1,0,1,1,1,1,1)) test_s<-cbind((11:20), test_s, NA) #This just names the dataframe columns colnames(train_s)<-(c(“key”,”a”,”b”,”c”,”d”,”dv”)) colnames(test_s)<-(c(“key”,”a”,”b”,”c”,”d”,”dv”)) train_s test_s “` The code above has developed two datasets of equal size that is similar to what we will have in the Kaggle contest. The concept of a test set is that…


Link to Full Article: MGMT6963-Lab6