Learn R Programming

promote (version 1.1.1)

promote.deploy: Deploy a model to promote's servers

Description

This function takes model.predict and creates a model on promote's servers which can be called from any programming language via promote's REST API (see promote.predict).

Usage

promote.deploy(model_name, confirm = TRUE, custom_image = NULL)

Arguments

model_name

name of your model

confirm

boolean indicating whether to prompt before deploying

custom_image

name of the image you'd like your model to use

Examples

Run this code
# NOT RUN {
promote.config <- c(
 username = "your username",
 apikey = "your apikey",
 env = "http://sandbox.promotehq.com/"
)
iris$Sepal.Width_sq <- iris$Sepal.Width^2
fit <- glm(I(Species)=="virginica" ~ ., data=iris)

model.predict <- function(df) {
 data.frame("prediction"=predict(fit, df, type="response"))
}
# }
# NOT RUN {
promote.library("randomForest")
promote.deploy("irisModel")
# }

Run the code above in your browser using DataLab