Output Model Tool

In some applications (such as real-time scoring) may warrant developing a model scoring capability outside of Alteryx. In these cases, a model developed in Alteryx can be exported to an external scoring application that can be based on either R or a third-party scoring engine based on PMML (predictive model markup language, an XML dialect). The Output Model macro enables this possibility by allowing a user to save an R model object created in Alteryx to disk, and then incorporated it into an external scoring application. A model may be saved in either R's compressed native binary format (which is identical across operating systems) or in PMML format. All of the predictive model types created in Alteryx can be written out in R's native format, and most can be written out in PMML format (an exception to this are models created with the Boosted Model tool, which are not supported in the R pmml package used by this tool).

It should be noted that if the objective is to create a model in an Alteryx workflow, and then use the model in either another workflow, a macro, or an analytic app, the preferred approach in these situations is to save the data stream containing the model object to disk using a standard Alteryx Output Data tool. It is possible to read a model saved in R's native format into Alteryx using an R tool, but it is more complicated than reading a model that is saved in YXDB format. Models created in PMML cannot be read into Alteryx.

Models saved to disk in R's native format are done so using R's saveRDS function. Consequently, they need to be read into an R process using the readRDS function, and assigned to an object name to be available within an R session.

Gallery tool

This tool is not automatically installed with Alteryx Designer or the R tools. To use this tool, download it from the Alteryx Analytics Gallery.

Connect an input

An Alteryx data stream containing a predictive model object (e.g., a model created using the Forest Model tool).

Configure the tool

  1. Save as a R native (RDS) binary file: Select this option if the desired file format for the external scoring application is R's own native format. If this option is selected, the user is asked to specify the name and location of the model.
  2. Save as a PMML file: Select this option if the desired file format for the external scoring application is PMML. If this option is selected, the user is asked to specify the name and location of the resulting model file.

View the output

No output data stream is created. Instead, a permanent file containing the model object is written to disk.