[doc] Use figure directive. (#7143)

This commit is contained in:
Jiaming Yuan 2021-08-03 15:56:25 +08:00 committed by GitHub
parent e2c406f5c8
commit ba47eda61b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,12 +44,9 @@ is the product of interaction between :math:`x_1`, :math:`x_7`, and
Source(source, format='png').render('../_static/feature_interaction_illustration1', view=False) Source(source, format='png').render('../_static/feature_interaction_illustration1', view=False)
Source(source, format='svg').render('../_static/feature_interaction_illustration1', view=False) Source(source, format='svg').render('../_static/feature_interaction_illustration1', view=False)
.. raw:: html .. figure:: ../_static/feature_interaction_illustration1.svg
:align: center
<p> :figwidth: 80 %
<img src="../_static/feature_interaction_illustration1.svg"
onerror="this.src='../_static/feature_interaction_illustration1.png'; this.onerror=null;">
</p>
When the tree depth is larger than one, many variables interact on When the tree depth is larger than one, many variables interact on
the sole basis of minimizing training loss, and the resulting decision tree may the sole basis of minimizing training loss, and the resulting decision tree may
@ -130,14 +127,12 @@ first and second constraints (``[0, 1]``, ``[2, 3, 4]``).
Source(source, format='png').render('../_static/feature_interaction_illustration3', view=False) Source(source, format='png').render('../_static/feature_interaction_illustration3', view=False)
Source(source, format='svg').render('../_static/feature_interaction_illustration3', view=False) Source(source, format='svg').render('../_static/feature_interaction_illustration3', view=False)
.. raw:: html
<p> .. figure:: ../_static/feature_interaction_illustration2.svg
<img src="../_static/feature_interaction_illustration2.svg" :align: left
onerror="this.src='../_static/feature_interaction_illustration2.png'; this.onerror=null;">
<img src="../_static/feature_interaction_illustration3.svg" .. figure:: ../_static/feature_interaction_illustration3.svg
onerror="this.src='../_static/feature_interaction_illustration3.png'; this.onerror=null;">
</p>
**************************************************** ****************************************************
Enforcing Feature Interaction Constraints in XGBoost Enforcing Feature Interaction Constraints in XGBoost