title: how to enforce Monotonic Constraints in XGBoost with ScikitLearn?
body: <p>I build up a XGBoost model using scikit-learn and I am pretty happy with it. As fine tuning to avoid overfitting, I'd like to ensure monotonicity of some features but there I start facing some difficulties...</p>
  
  <p>As far as I understood, there is no documentation in scikit-learn about xgboost (which I confess I am really surprised about - knowing that this situation is lasting for several months). The only documentation I found is directly on <a href="http://xgboost.readthedocs.io" rel="noreferrer">http://xgboost.readthedocs.io</a></p>
  
  <p>On this website, I found out that monotonicity can be enforced using "monotone_constraints" option. 
  I tried to use it in Scikit-Learn but I got an error message "TypeError: <strong>init</strong>() got an unexpected keyword argument 'monotone_constraints'"</p>
  
  <p>Do you know a way to do it ?</p>
  
  <p>Here is the code I wrote in python (using spyder):</p>
  
  <pre><code>grid = {'learning_rate' : 0.01, 'subsample' : 0.5, 'colsample_bytree' : 0.5,
      'max_depth' : 6, 'min_child_weight' : 10, 'gamma' : 1, 
      'monotone_constraints' : monotonic_indexes}
  #'monotone_constraints' ~ = "(1,-1)"
  m07_xgm06 = xgb.XGBClassifier(n_estimators=2000, **grid)
  m07_xgm06.fit(X_train_v01_oe, Label_train, early_stopping_rounds=10, eval_metric="logloss", 
      eval_set=[(X_test1_v01_oe, Label_test1)])
  </code></pre>