DOC escape underscores in TeX
@@ -440,10 +440,10 @@ the total number of predictions).
In contrast, if the conventional accuracy is above chance only because the
classifier takes advantage of an imbalanced test set, then the balanced
-accuracy, as appropriate, will drop to :math:`\frac{1}{\text{n_classes}}`.
+accuracy, as appropriate, will drop to :math:`\frac{1}{\text{n\_classes}}`.
The score ranges from 0 to 1, or when ``adjusted=True`` is used, it rescaled to
-the range :math:`\frac{1}{1 - \text{n_classes}}` to 1, inclusive, with
+the range :math:`\frac{1}{1 - \text{n\_classes}}` to 1, inclusive, with
performance at random scoring 0.
If :math:`y_i` is the true value of the :math:`i`-th sample, and :math:`w_i`
@@ -463,8 +463,9 @@ defined as:
With ``adjusted=True``, balanced accuracy reports the relative increase from
:math:`\texttt{balanced-accuracy}(y, \mathbf{0}, w) =
-\frac{1}{\text{n_classes}}`. In the binary case, this is also known as
-`*Youden's J statistic* <https://en.wikipedia.org/wiki/Youden%27s_J_statistic>`_, or *informedness*.
+\frac{1}{\text{n\_classes}}`. In the binary case, this is also known as
+`*Youden's J statistic* <https://en.wikipedia.org/wiki/Youden%27s_J_statistic>`_,
+or *informedness*.
.. note::
