I want to try out to directly train on the ‘corr’ on which we are scored on. For this I would have to implement the Spearman correlation and get the gradient and hessian to be able to use it as a custom loss function in xgboost (or keras etc.). So far I was able to implement it in tensorflow and also get the gradient but the hessian does not work yet. I created a question with the details on stackoverflow:
Maybe someone of you has already tried to do something similar and knows why my code isn’t quite right yet.
Thanks for the reply. I got it working by setting the hessians to 1 instead of actually calculating them. I’m able to train with it in xgboost but even after quite some parameter tuning I’m so far not able to get better results than from just using rmse or similar standard loss functions.