Optimal regularizations for data generation with probabilistic graphical models