Skip to content

Instantly share code, notes, and snippets.

@BenHeubl
Created February 13, 2020 16:29
Show Gist options
  • Select an option

  • Save BenHeubl/57cd30f8b24e53d927b8bc914bf1ef6d to your computer and use it in GitHub Desktop.

Select an option

Save BenHeubl/57cd30f8b24e53d927b8bc914bf1ef6d to your computer and use it in GitHub Desktop.
tut4
#load packages:
install.packages('rpart')
install.packages('rpart.plot')
library(rpart)
library(rpart.plot)
#This is our base model:
Brexit_model <- rpart(Percent.Leave ~ . , data = Brexit_train, method = "class", control = rpart.control(cp = 0))
Brexit_model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment