Import pmml file created in R

80 views Asked by At

I want to import in SAS an XGBoost classification model with pmml file created in R. It's created with pmml package pmml_2.3.1 in R version 3.6.2. The pmml file version is PMML version="4.4", but I manually change it to PMML version="4.2"

when I import it in SAS with this command:

PROC PSCORE PMML FILE = "PATH.pmml"
DS FILE = "PATH.sas";
run;

I get the following error:

ERROR: Given PMML File is not well formed or correct, error near line number: 598897.

This is on the line 598897 in the pmml file:

<RegressionModel functionName="classification" normalizationMethod="softmax" modelName="CollectingModel">

What should I do?

2

There are 2 answers

3
user1808924 On

The legacy pmml package is known to generate terribly inefficient PMML markup. Does the situation improve if you re-export your XGBoost model using the r2pmml package?

0
Luciano Kalatalo On

You cant import, based on SAS documentation:

PROC PSCORE currently supports the use of PMML 4.2. Earlier versions of PMML are not supported for use with PROC PSCORE

So, if you are just changing the pmml version manually. 4.4 to 4.2 it will not help