Time series binary classification probability smoothing Problem
Suppose we have trained binary classifier and want to predict value of [x1, ..., x5] with associated timestamps [t1, ..., t5]. We get the prediction as following: [0.25, 0.99, 0.1, 0.75, 0.79].
Assume that I have the domain knowledge to say that probability of positive class must not change abruptly. Jumps like from 0.99 at t2 to 0.1 at t3 cannot occur in real application.
Questions

Can I enforce smooth output constraint on (any/some) classifier?
Does applying moving average on the prediction probability to smooth it make sense?
You can use a total variation regularizer (https://en.wikipedia.org/wiki/Total_variation_denoising), it's a penalty for abrupt changes of neighbor values. It's usually used for images, that's why its TF version (https://www.tensorflow.org/api_docs/python/tf/image/total_variation) operates with 4D tensors, but if you're writing your model in pytorch for instance, it's easy to implement that regularizer yourself. Also possibly you don't need it if you've got enough data and target values there are already smooth. Your ML algorithm would just learn that smoothness from data, the only 2 cases you'd need it is when your dataset is small or when your training targets aren't smooth, but testing targets should be smooth.