Inferring effective couplings with Restricted Boltzmann Machines