02-26-2017 08:23 AM - edited 02-26-2017 08:26 AM
I am developing a simple neural network model in Rapidminer to predict the number of cars passing on a highway every hour. As it is obvious, in the early morning (from 2:00 am to 6:00 am) few cars are on the highway and sometime my model predicts the number of cars to be negative (like -2 or -3), which is understandable statistically but is not cool when you want to report it somewhere.
I am looking for a way to put constraint on the model so that it would only predict positive numbers. How can I do that?
02-27-2017 03:16 AM
there's usually no way to put numerical constraints directly into models. You want them to be unbiased by expectations and "give their best".
But you can always put a Generate Attributes behind the prediction step and change impossible values to 0.
E. g. prediction = if([prediction] < 0, 0, [prediction])