ConnectHEOR Interview Question

They gave me a machine learning algorithim and asked me how would I derive loss function and why.