Skip to content

Instantly share code, notes, and snippets.

@sdgilley
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdgilley/4df6d26ab8cd653e64a7 to your computer and use it in GitHub Desktop.
Save sdgilley/4df6d26ab8cd653e64a7 to your computer and use it in GitHub Desktop.
build.R - script used in Building and Using Models in DeployR Tutorial
sampleData<-read.csv("http://packages.revolutionanalytics.com/datasets/ccFraud.csv",
nrows=100000)
# a simple tree model
library(rpart)
model <- rpart(fraudRisk~balance+numTrans+creditLine, data=sampleData)
save(model, file="model.rData")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment