Upload new PMML source or serialized model file to Zementis Server.
upload_model(file, applyCleanser = TRUE, ...)
file | Path to a file or a |
---|---|
applyCleanser | Logical indicating if the server should perform cleansing
on the PMML file. (Default: |
... | Additional arguments passed on to the underlying HTTP method.
This might be necessary if you need to set some curl options explicitly
via |
If a model with the same name already exists on the server or if is not valid PMML, an error. Otherwise a list with the following components:
model_name
The name of the uploaded model
is_active
A logical indicating the activation status of the model
which is TRUE after the initial model upload.
if (FALSE) { #Build a simple lm model iris_lm <- lm(Sepal.Length ~ ., data=iris) # Convert to pmml and save to disk iris_pmml <- pmml::pmml(iris_lm, model.name = "iris_model") saveXML(iris_pmml, "iris_pmml.xml") # Upload model to server upload_model("iris_pmml.xml") # Second option: Upload XMLNode object directly iris_pmml <- pmml::pmml(iris_lm, model.name = "iris_model_opt2") upload_model(iris_pmml) }