The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Negative values in predictions
Hi everyone,
I am making predictions but I don't want my results to have negative values ( even if I wanted there can't be in the dataset I have).
How could I handle it?
Thanks in advance.
I am making predictions but I don't want my results to have negative values ( even if I wanted there can't be in the dataset I have).
How could I handle it?
Thanks in advance.
Tagged:
0
Best Answer
-
Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn@Papad The issue is that with a numerical label, although you may not have observed negative values in your training dataset, if the model is based on functions, then new input values could lead to a negative prediction via extrapolation. The only ways to NEVER get negative predicted values would either be to use a model that inherently cannot predict negative values (such as certain types of link functions in GLM models such as Poisson or logistic) or to use a model that does not extrapolate (e.g., certain types of tree models). Otherwise you cannot guarantee that the model will not see new input data and generate a prediction outside the previously predicted range (which could be negative).
3
Answers
Scott
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
I think that the way you suggest is just to change values that my model will produce, but what I want is my model from its own not to give negative values.
To make it more clear, the dataset I have will never include negative values, it is impossible . So I want my model to know it in order to give positive values.
Probably the solution you give won't affect too much the accuracy because maybe we talk for one or two values in a collection of 1000.
Although I will try what you suggest.
Thanks again.