Uncertainty in regression tasks
Let us consider a sensor whose output can be modeled by a linear process, defined by the relationship y = x.
Let us say we sample data for x lying in the range [-2.5,2.5]. Now, there would always be some noise introduced because of the inherent physical processes of the sensor (for example, white noise). Additionally, the sensor may have limitations such as temperature or pressure requirements. The following graph shows data from our sensor:
Figure 5.5 – Different kinds of uncertainty in data
We can see that in the lower-left corner, due to some malfunction, there is high aleatoric uncertainty. Also, there are large gaps where there is no observed training data, which can cause high epistemic uncertainty in that range of inputs.
Before we talk about measuring these uncertainties, let us build a model and train it on the training data.
We use TensorFlow Dense layers to build the model. We start with an input...