duke_deploy: Deploy model using REST API

Description Usage Arguments Value See Also Examples

View source: R/duke_deploy.R

Description

Deploy model using REST API

Usage

1
2
duke_deploy(auth_details, model_object, predict_udf = NULL,
  host_name = NULL)

Arguments

auth_details

authorization parameters (must be stored in list format: list(user_name='exampleusername',api_key='exampleapikey')).

model_object

the model to deploy e.g. lm() or glm() object.

predict_udf

user defined function as alternative to the built-in model object predict function.

host_name

optional parameter.

Value

Deployment status, success or failure with message.

See Also

duke_predict for making predictions with deployed models or duke_list to display a list of all deployed models.

Examples

1
2
3
4
5
6
7
8
duke_auth <- list(
user_name = "try_it",
api_key   = "db1542b66f16aba5768d8a19c27dec4facf9168a",
endpoint = "/api/v1.0"
)
example_data <- as.data.frame(cbind(gl(3,50),rnorm(150)));names(example_data) <- c("x","y")
example_fit  <- lm(y~x,data=example_data)
duke_deploy(auth_details=duke_auth,model_object=example_fit)

ddeploy documentation built on May 30, 2017, 1:20 a.m.