I'm trying to build a classifier using Xgboost on some high dimensional data, the problem I'm having is that I have the prior knowledge that the output probabilities should be ascending regarding a feature(say x), but I don't know how can I make the model understand this!

For example for a data point with features Feat I want to have:

predict_proba(Feat[x=1]) <= predict_proba(Feat[X=2])

where the rest of the features are the same.


1 Answer 1


You can enforce such monotonicity with the monotone_constraints (hyper)parameter:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.