Skip to content

Instantly share code, notes, and snippets.

View sdgilley's full-sized avatar

Sheri Gilley sdgilley

  • Microsoft
  • Chicago, IL
View GitHub Profile
# Set MKL threads if Revolution R Open or Revoltion R Enterprise is available
if(require(Revobase)){
setMKLthreads(4)
}
# Initialization
set.seed (1)
@sdgilley
sdgilley / score.R
Last active August 29, 2015 14:19 — forked from dec100/score.R
score.R - script used in Building and Using Models in DeployR Tutorial
library(deployrUtils)
deployrPackage("rpart")
# load the model
if (!exists("model")) load(file="model.rData")
# provide some values for an observation to be scored
deployrInput('{"name": "balance","render": "numeric","default": 2000}')
deployrInput('{"name": "numTrans","render": "numeric","default": 10}')
deployrInput('{"name": "creditLine","render": "numeric","default": 18}')