Two Sigma interview question

to code an ML regression loss function