Hi Gaurav,
Thanks for the answer, with value 2, the PMML table gets generated with multiple rows, but that PMML table can't be consumed directly by the forecasting method as the following (although the PMML generated in the example with 3 variables can be directly consumed by the forecasting method exactly with the same code and it generates the predicted probabilities for the test data correctly). In my case I get the following error:
Could not execute 'CALL DM_PAL.PAL_FORECASTWITHLOGISTICR_PROC(PAL_FLOGISTICR_PREDICTDATA_TBL, "#PAL_CONTROL_TBL", ...' in 923 ms 172 µs .
SAP DBTech JDBC: [423]: AFL error: [423] _SYS_AFL.AFLPAL:FORECASTWITHLOGISTICR: [423] (range 3) AFL error exception: exception 73001060: PAL error[73001060]:Internal error. Check trace for details.
Another option, as you mentioned, is to use the coefficient table (instead of the PMML table) as input for forecasting, but again many of the coefficients generated are dummy variable coefficients, not the original categorical variables, so I need to preprocess the test data before I can use them for prediction, which I want to avoid.
The part of code is as below for your reference, thanks for your help.
DROP TYPE PAL_FLOGISTICR_COEFFICIENT_T;
CREATE TYPE PAL_FLOGISTICR_COEFFICIENT_T AS TABLE("ID" INTEGER,"PMMLModel" VARCHAR(5000));
DROP TABLE PAL_FLOGISTICR_COEEFICIENT_TBL;
CREATE COLUMN TABLE PAL_FLOGISTICR_COEEFICIENT_TBL LIKE PAL_FLOGISTICR_COEFFICIENT_T;
INSERT INTO PAL_FLOGISTICR_COEEFICIENT_TBL SELECT * FROM PAL_LOGISTICR_PMMLMODEL_TBL;
...
CALL DM_PAL.PAL_FORECASTWITHLOGISTICR_PROC(PAL_FLOGISTICR_PREDICTDATA_TBL, "#PAL_CONTROL_TBL", PAL_FLOGISTICR_COEEFICIENT_TBL, PAL_FLOGISTICR_FITTED_TBL) WITH OVERVIEW;
Thanks for your help.