# XGBClassifier: make the output of predict_proba ascending regarding a specific feature

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.

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