Putting constraint on neural network's output in Rapidminer

amirh_hassanpouamirh_hassanpou Member Posts: 1 Contributor I
edited November 2018 in Help

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?



  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn



    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])




Sign In or Register to comment.