Description Usage Arguments Details Value See Also Examples
View source: R/get_model_metrics.R
Gets memory metrics and prediction metrics for a deployed PMML model from Zementis Server.
1 | get_model_metrics(model_name, ...)
|
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 |
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.
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
.
upload_model
, predict_pmml
, predict_pmml_batch
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.