# "polynomial regression"

hello,i try to do some prediction of the amount of product sales with polynomial regression but when i get the result i try to calculate the amount using the formula that rapidMiner gives to me,but i have some values that are negative so what can i do in this case?i think that this negative value have to be in zero.

thank you for helping me.

thank you for helping me.

Tagged:

0

## Answers

12Contributor II1,869Unicornthe regression methods are not bound to any value range. Generally speaking, they try to approximate the input data by a formula, and the prediction for new values are created by inserting the values into the formula.

Especially the polynomial regression tends to get bad for values outside of the range of the input data because of the nature of polynomials. Did you try different regression methods like the linear regression or gaussian processes?

If you want to change negative predictions to zeros after applying a model, you could use Generate Attributes after renaming the prediction attribute to a name without special characters.

E.g. rename prediction(label) to prediction, then use Generate Attributes with the following formula: if(prediction < 0; 0; prediction)

As a general advice I strongly suggest that you also validate your model with a X-Validation or any other validation method, if you have not done that before.

Best regards,

Marius