predict_pmml: Get prediction for single input record from PMML model

Description Usage Arguments Value See Also Examples

View source: R/predict_pmml.R

Description

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.

Usage

1
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:

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

upload_model, predict_pmml_batch

Examples

1
2
3
4
## Not run: 
predict_pmml(iris[42, ], "iris_model")

## End(Not run)

alex23lemm/zementisr documentation built on Jan. 9, 2020, 1:49 a.m.