Skip to content

Commit f6482e6

Browse files
committed
Small fixes and improvements in model_evaluation.rst
1 parent 1b2d0ed commit f6482e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/modules/model_evaluation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,13 +2361,13 @@ Pinball loss
23612361

23622362
The :func:`pinball_loss` function is mostly used to evaluate the predictive
23632363
performance of quantile regression models. The `pinball loss
2364-
<https://en.wikipedia.org/wiki/ Quantile_regression#Computation>`_ is
2364+
<https://en.wikipedia.org/wiki/Quantile_regression#Computation>`_ is
23652365
equivalent to :func:`mean_absolute_error` when the quantile parameter ``alpha``
23662366
is set to 0.5.
23672367

23682368
.. math::
23692369
2370-
\text{pinball}(y, \hat{y}) = \frac{1}{n_{\text{samples}}} \sum_{i=0}^{n_{\text{samples}}-1} \left( \alpha (y_i - \hat{y}_i)^+ - (1 - \alpha) (y_i - \hat{y}_i)^- \right)
2370+
\text{pinball}(y, \hat{y}) = \frac{1}{n_{\text{samples}}} \sum_{i=0}^{n_{\text{samples}}-1} \alpha \max(y_i - \hat{y}_i, 0) + (1 - \alpha) \max(\hat{y}_i - y_i, 0)
23712371

23722372
Here is a small example of usage of the :func:`pinball_loss` function::
23732373

@@ -2409,7 +2409,7 @@ Such a scorer can be used in a cross-validation loop:
24092409

24102410
It is also possible to build scorer objects for hyper-parameter tuning, in
24112411
which case the sign of the loss must be switched to ensure that greater means
2412-
better as explain in the example linked below.
2412+
better as explained in the example linked below.
24132413

24142414
.. topic:: Example:
24152415

0 commit comments

Comments
 (0)