Generative vs. Discriminative modeling under the lens of uncertainty quantification