Reputation: 83
I have a set of features: x1, x2, x3. Furthermore, I have a set of labels: y1, y2, y3.
For example, my x variables are height, weight and years of education. Each Yi represents a grade in the following fields: Science, Arts and Management. Each student is assigned with a grade for the co responsive field (Science, Arts, Management). I'd like to use the xgboost algorithm to identify the class with minimum score. For example, if the marks are (10, 25, 5), then the algorithm should predict the class as y3. How can I customize my objective function to achieve this task. I am an R user
Upvotes: 1
Views: 1713
Reputation: 3208
In that case, not sure its the best way to solve this, but it'll solve it.
Build 3 models. Each model will predict class Yi
based on x1, x2, x3
. (this means you will copy your data 3 times and for each copy, you will predict the co-responsive Yi
so model1 will predict the grade of class1, model2 of class2 and so on.
Than, run a minimum problem on the results from the models. the minimum is the winner.
Use a regular "linear:reg" objective function for each model.
Evaulate your program with a simple accuracy test.
Upvotes: 1