Description Usage Arguments Value See Also Examples
Predict using deployed model using REST API.
1 | duke_predict(auth_details, model_name, new_data, host_name = NULL)
|
auth_details |
authorization parameters (must be stored in list format: list(user_name='exampleusername',api_key='exampleapikey')) |
model_name |
the name of the deployed model for predictions. |
new_data |
new feature values for predictions. |
host_name |
optional parameter. |
On successful prediction, a character vector with model predictions. An error message is returned on failure.
duke_deploy
for deploying a model or duke_list
to display a list of all deployed models.
1 2 3 4 5 6 7 | 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")
duke_predict(auth_details=duke_auth,model_name="example_fit",example_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.