Gets memory metrics and prediction metrics for a deployed PMML model from Zementis Server.

get_model_metrics(model_name, ...)

Arguments

model_name

Name of the PMML model whose metrics are fetched from the server.

...

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_name A length one character vector containing the model_name

  • prediction_metrics A data frame containing prediction-related metrics for model_name. The information contained in prediction_metrics differs between regression and classification models.

  • memory_metrics A data frame containing memory-related metrics for model_name expressed in MB.

If no predictions have been calculated for model_name thus far on Zementis Server, prediction_metrics won't be included in the response list.

If the model is deactivated while get_model_metrics() is called, the return list neither includes memory_metrics nor prediction_metrics.

Details

The HTTP endpoint accessed by get_model_metrics() is only available for Zementis Server 10.3 or higher. See vignette("model-metrics") for more details on that function and for best practices how to visualize the different model metrics of your predictive models.

See also

Examples

if (FALSE) { # Some prep work iris_lm <- lm(Sepal.Length ~ ., data = iris) iris_pmml <- pmml::pmml(iris_lm, model.name = "iris_model") upload_model(iris_pmml) # only includes memory metrics get_model_metrics("iris_model") predict_pmml_batch(iris[23:33, ], "iris_model") # includes memory and prediction metrics get_model_metrics("iris_model") }