duke_predict: Predict using deployed model using REST API.

Description Usage Arguments Value See Also Examples

View source: R/duke_predict.R

Description

Predict using deployed model using REST API.

Usage

1
duke_predict(auth_details, model_name, new_data, host_name = NULL)

Arguments

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.

Value

On successful prediction, a character vector with model predictions. An error message is returned on failure.

See Also

duke_deploy for deploying a model or duke_list to display a list of all deployed models.

Examples

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)

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