Coefficients from polynomial regression giving different predictions in excel and predictor node

I have built a small Polynomial regression model and I tried to deploy the model into production system, which will use the coefficients from the model and predict the target variable using the real time data. But when I deployed the model, I found out that the predictions are coming out to be completely wrong. For example, the target variable should be around 60, but the model that I deployed was predicting in 400s. I used the test data that I used for predictor node in KNIME and compared the results I get from 1. KNIME predictor node and 2. After solving for the regression equation from the coefficients in Excel. I have attached all the required sample files. Please help me find out where the fault is. This is the first time I’m facing this issue. Thanks in advance.

Edit: I presume the regression equation should be Target = Coeff1 * Pred1 + Coeff2 * Pred2 + … + Coeff3 * Pred1 * Pred1 + Coeff4 * Pred2 * Pred2… and have applied the same equation in Excel for comparison. Please correct me if I’m wrong.

Solving for the regression equation.xlsx (13.6 KB) PolyReg Coefficient Discrepancy Workflow.knwf (140.1 KB)

@Sabbarish Welcome to the Forum!!. I’ve done the computation and it works. Please find attached the excel file Coefficients.xls with the details. I’d check the variables/model since most of the variables are non significant. Coefficients.xlsx (12.0 KB)

1 Like

Hi @iperez, Thank you so much for your help. I understood that the delta was due to inaccuracy of the coefficients in my side. I have a quick followup question, how did you extract coefficients accurate to 15 decimal places like you did in your sheet? I was stuck in this thing for almost half a day now, so again, I’m very grateful for your quick response.

@Sabbarish Sorry, deleted the previous reply by mistake. Just write the output table to a Excel file.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.