predict_pmml() returns the prediction for a single input record that is sent to Zementis Server. The value returned depends on the type of prediction model being executed on the server.

predict_pmml(x, model_name, ...)

Arguments

x

A one row data frame containing the data record which is sent to Zementis Server for prediction. The data frame column names must match the PMML model argument names.

model_name

The name of the deployed PMML model that gets the prediction on the new data record x.

...

Additional arguments passed on to the underlying HTTP method. This might be necessary if you need to set some curl options explicitly via config.

Value

A list with the following components:

  • model A length one character vector containing the model_name that was executed on the server

  • outputs A data frame containing the prediction results for x

For regression models outputs will include a 1-column data frame with the predicted value.

For binary classification models outputs will include a 3-column data frame that includes the probability of class 0, the probability of class 1 and the classification class label result based on a 50% threshold.

See also

Examples

if (FALSE) { predict_pmml(iris[42, ], "iris_model") }