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.