Description Usage Arguments Value See Also Examples
Deploy model using REST API
1 2 | duke_deploy(auth_details, model_object, predict_udf = NULL,
host_name = NULL)
|
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. |
Deployment status, success or failure with message.
duke_predict
for making predictions with deployed models or duke_list
to display a list of all deployed models.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.