Multidimensional Loss Function

Viewed 17

I am implementing a custom L2 loss function within XGBoost and am stumped regarding how to implement loss represented by two independent parameters.

For my application, the industry standard benchmark for testing a process includes the error on that model output (y) and the error on the trend (time derivative) of the process (dy/dt). Thus I have two loss function components:

  • f1 = MSE(y_est, y_true)
  • f2 = MSE(d(y_est)/dt, d(y_true)/dt)

Training against just f1 resulted in an unacceptable increase in f2 error when testing the model (f2 has much tighter bounds), so I have to train using the loss of both components.

I can easily compute both the gradient and the hessian of both f1 and f2 independently, but I do not know how to combine them into a final result for XGBoost.

0 Answers
Related