How to make machine learning model that reports ambiguity of the input?
Another specific way to do this if one uses a neural network for this. Use a dropout a layer in your network and instead of scaling the activations at test time, one can sample the activations (just like in training-time) and predict multiple times for a given input, then look at distribution of your outputs. Intuitively this would add "probabilistic, bayesian effect" to you neural network.
I think this method was first proposed in Dropout as a Bayesian Approximation:
Representing Model Uncertainty in Deep Learning which is called Monte Carlo Dropout.