# “Export” machine learning model from R

I can build and implement classic ML models on traditional training/test sets in R, but what if a partner wants to get this model in order to implement his own (any kind of) system? Saving and sending the R-model structure doesn't help, of course; and figuring out the prediction mechanism doesn't work in many (black box) cases neither. So how to generalize and utilize the model's learned rules?

One way to share models between the software that does the actual model fitting and the software that is used to do the predictions is the Predictive Model Markup Language (PMML). This is an XML-based standard maintained by the Data Mining Group consortium. It allows to deploy models to other applications, to the cloud, or database systems. So if the software that your partner wants to is PMML-compliant, then you can employ the pmml package to export your models from R. Of course, there are more machine learning models implemented in R than supported by the PMML standard or the pmml R package but there is quite a range of supported models. The pmml package is also employed by the rattle data mining GUI in R.