# Polynomial Regression learner coefficients don't work in my excel model

Hello,
I have built a workflow for a multivariate polynomial regression, with cross-validation. I have collected the coefficients from the polynomial regression learner, implemented them in an excel model and the results don’t match Knime predicted data from the Regression Predictor. The average error in Knime predicted data is quite smaller. Where is the problem? I attached the workflow and the excel model and Knime predicted data.
Best regards,
Excel model.xlsx (25.9 KB)
Predicted data.xlsx (24.4 KB)

Welcome to the forum @JuanTorresM.

One problem I see is that your formula in the Excel model workbook has an error in the 6th term.

For illustration, in row 221, instead of:

`=C\$226*A221+C\$227*B221+C\$228*C221+C\$229*D221+C\$230*E221+C\$231*(B221^2)+C\$232*(B221^2)+C\$233*(C221^2)+C\$234*(D221^2)+C\$235*(E221^2)+C\$236`

it should be:

`=C\$226*A221+C\$227*B221+C\$228*C221+C\$229*D221+C\$230*E221+C\$231*(A221^2)+C\$232*(B221^2)+C\$233*(C221^2)+C\$234*(D221^2)+C\$235*(E221^2)+C\$236`

Another problem is your choice of coefficients to evaluate in Excel. In your workflow, you used the X-Partitioner. This is going to run many times, partitioning the data a different way every time. So, on each iteration the Polynomial Regression Learner is going to generate new coefficients because it’s been given new training data, and the Regression Predictor is going to use these constantly updating coefficients on the new test data it’s been given.

You can’t select the coefficients for one iteration and expect the values in the final X-Aggregated table to correspond.

4 Likes

Many thanks for the clarifications Elsamuel.
I have corrected the coefficients in my excel model and now it works properly.
Kind regards,

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