This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Setup | |
rm(list = ls(all = TRUE)) #CLEAR WORKSPACE | |
#Directory | |
setwd("~/Overfitting") | |
#Load Required Packages | |
library('caTools') | |
library('caret') | |
library('glmnet') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# minor changes from script by dsparks | |
# Letting plyr do the work for us. | |
# | |
# Install and load needed packages | |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("foreign", "plyr", "Hmisc", "ggplot2") | |
toInstall <- toInstall[!toInstall%in%library()$results[,1]] #check if present | |
if(doInstall&length(toInstall)!=0) | |
{install.packages(toInstall, repos = "http://cran.r-project.org")} |