(Un)pack parameters.
Compute likelihood cost.