How to get feature importance in xgboost by 'information gain'?
<p>we can get feature importance by 'weight' :</p>

<pre><code>model.feature_importances_
</code></pre>

<p>But this is not what i want. I want by importances by information gain. </p>

<p>we can get feature importance by 'gain' plot :</p>

<pre><code>xgboost.plot_importance(model, importance_type='gain')
</code></pre>

<p>However, I don't know how to get feature importance data from above plot. Or </p>

<p>if there is function like <code>model.feature_importances_</code> to give gain feature importance? Either of the two ways will work. Please let me know in comments if the question is not clear</p>