title: XGBoost R vs python - different performance and feature importance
body: <p>I have this problem with xgboost I use at work. My task is to port a piece of code that's currently running in R to python. </p>
  
  <p><em>What the code does:</em>
  My aim is to use XGBoost to determine the features with most gain. I made sure the inputs into the XGBoost are identical in R and python. The XGBoost is run roughly 100 times (on different data) and each time I extract 30 best features by gain. </p>
  
  <p><strong>My problem</strong> is this: 
  The input in R and python are identical. Yet python and R output vastly different features(both in terms of total number of features per round, and which features are chosen). They only share about 50 % of features. My parameters are the same, and I don't use any samples, so there is no randomness. </p>
  
  <p>Also, another thing I noticed - XGBoost is slower in python when compared to R with the same parameters. Is it a known issue?</p>
  
  <p><a href="https://i.stack.imgur.com/LC3JG.png" rel="noreferrer">R parameters</a></p>
  
  <p><a href="https://i.stack.imgur.com/WbN6h.png" rel="noreferrer">Python parameters</a></p>
  
  <p>I've been trying to look around, but didn't find anyone having a similar problem. I can't share the data or code, because it's confidential. Does someone have an idea why the features differ so much?</p>
  
  <p>R version: 3.4.3</p>
  
  <p>XGBoost R version: 0.6.4.1</p>
  
  <p>python version: 3.6.5</p>
  
  <p>XGBoost python version: 0.71</p>
  
  <p>Running on Windows.</p>