Machine Learning Loss Function Formula