Walk me through the mathematical formulation of a loss function you have customized for a past project.