Learning From Weakly Representative Data And Applications In Spectral Image Analysis