Assignment to learn potentials for MRF from feature based representation