I'm using a multi-layer perceptron model to predict the cumulative number of boardings and alightings from a bus travelling on a standard route based on previous cumulative boarding and alighting values and a few other parameters. I have made separate models with each of the two as the label or dependent variable and have got the predictions. But I want to use a constraint such that the predicted alighting values is less than the predicted boarding values at each stage (since the number of people that get off a bus can't be higher than the number of people that got on). I could run the model to predict the boarding values first and then use those predictions as a feature to predict the cumulative alighting values. However, I still can't figure how to implement this constraint. Any suggestions will be really appreciated, thanks.
$\begingroup$
$\endgroup$
2
-
$\begingroup$ If you predict the current number of people in the bus you can derive boardings and alightings from that number $\endgroup$– FirebugCommented Jul 8, 2021 at 14:10
-
$\begingroup$ Very similar question: stats.stackexchange.com/questions/463751/… $\endgroup$– Sycorax ♦Commented Jul 8, 2021 at 14:33
Add a comment
|