Two Sigma Interview Question

to code an ML regression loss function