I am trying to implement my simple logistic regression PMMLs (generated in R and Python) in KNIME and score a test data set of only 4 rows and 4 columns. I am unable to produce the final class probabilities, i.e. the sigmoid function is not applied on top of the “sum of coefficients times variable values” quantity. So basically KNIME predictor generates 2.654, but I need 1/(1+exp(-2.654)) = 0.93. My detailed question, with the full PMMLs and workflow are here:
Your helps are highly appreciated! Thank you.
Have you tried to score the data set on the PMML models using a different environment than KNIME? Maybe there is a problem with the PMML models itself. However, an easy solution to get the right predictions would be to use the Math Formula node to apply the sigmoid function on the output of the PMML Predictor. I hope this will help you.
KNIME actually gives a response that the model in question is not a Regression model. And in the PMML in question it says the functionName is “classification” (not regression). Could be that KNIME’s interpretation is wrong, I am not a PMML expert.
kn_example_logistic_regression_pmml.knwf (31.9 KB)