samedi 23 juillet 2016

Is it possible to supply a custom objective function of categorical data to xgboost in python?

I have categorical data and an objective function that I'm trying to optimize. In xgboost docs, it's mentioned that you can supply your own objective function but it must return the gradient and hessian. I'm not sure what the hessian or gradient means when I have categorical data. The objective function looks somewhat like this

sum_{all classes i} ((number of correct predictions in class_i) / (number in class i))

Is it possible to create a custom objective function in this case?

Aucun commentaire:

Enregistrer un commentaire