There are a couple of examples in the XGBoost forums using customised objective functions in R, but I have not seen any in Julia/XGB. Any hints would be appreciated. Also, if I get something working, I will post it.
Since I first put this up, I noticed the example given on here, which is much appreciated. Unfortunately, it does not quite run as written, but does run with a few minor changes.
These are (1 putting the names of the objective function and evalerror in quotes in the calling sequence, and (2, more subtle) changing exp(-preds) to exp.(-preds) as Julia is picky about functions acting elementwise on arrays or vectors (fair enough in this case, as exp() of a square matrix has another meaning).
There are a couple of examples in the XGBoost forums using customised objective functions in R, but I have not seen any in Julia/XGB. Any hints would be appreciated. Also, if I get something working, I will post it.
Since I first put this up, I noticed the example given on here, which is much appreciated. Unfortunately, it does not quite run as written, but does run with a few minor changes. These are (1 putting the names of the objective function and evalerror in quotes in the calling sequence, and (2, more subtle) changing exp(-preds) to exp.(-preds) as Julia is picky about functions acting elementwise on arrays or vectors (fair enough in this case, as exp() of a square matrix has another meaning).