Generation of primordial cosmological perturbations from statistical mechanical models