get_model_metrics: Get PMML model metrics

Description Usage Arguments Details Value See Also Examples

View source: R/get_model_metrics.R

Description

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

Usage

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

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.

Value

A list with the following components:

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.

See Also

upload_model, predict_pmml, predict_pmml_batch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 ## Not run: 
   # 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")

## End(Not run)

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