A latent space metric for enhancing prediction confidence in earth observation data