Skip to content

Commit ba47eda

Browse files
authored
[doc] Use figure directive. (dmlc#7143)
1 parent e2c406f commit ba47eda

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

doc/tutorials/feature_interaction_constraint.rst

+8-13
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,9 @@ is the product of interaction between :math:`x_1`, :math:`x_7`, and
4444
Source(source, format='png').render('../_static/feature_interaction_illustration1', view=False)
4545
Source(source, format='svg').render('../_static/feature_interaction_illustration1', view=False)
4646

47-
.. raw:: html
48-
49-
<p>
50-
<img src="../_static/feature_interaction_illustration1.svg"
51-
onerror="this.src='../_static/feature_interaction_illustration1.png'; this.onerror=null;">
52-
</p>
47+
.. figure:: ../_static/feature_interaction_illustration1.svg
48+
:align: center
49+
:figwidth: 80 %
5350

5451
When the tree depth is larger than one, many variables interact on
5552
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]``).
130127
Source(source, format='png').render('../_static/feature_interaction_illustration3', view=False)
131128
Source(source, format='svg').render('../_static/feature_interaction_illustration3', view=False)
132129

133-
.. raw:: html
134130

135-
<p>
136-
<img src="../_static/feature_interaction_illustration2.svg"
137-
onerror="this.src='../_static/feature_interaction_illustration2.png'; this.onerror=null;">
138-
<img src="../_static/feature_interaction_illustration3.svg"
139-
onerror="this.src='../_static/feature_interaction_illustration3.png'; this.onerror=null;">
140-
</p>
131+
.. figure:: ../_static/feature_interaction_illustration2.svg
132+
:align: left
133+
134+
.. figure:: ../_static/feature_interaction_illustration3.svg
135+
141136

142137
****************************************************
143138
Enforcing Feature Interaction Constraints in XGBoost

0 commit comments

Comments
 (0)