@@ -587,12 +587,12 @@ def explained_variance_score(y_true, y_pred, *,
587
587
@_deprecate_positional_args
588
588
def r2_score (y_true , y_pred , * , sample_weight = None ,
589
589
multioutput = "uniform_average" ):
590
- """R^2 (coefficient of determination) regression score function.
590
+ """:math:` R^2` (coefficient of determination) regression score function.
591
591
592
592
Best possible score is 1.0 and it can be negative (because the
593
593
model can be arbitrarily worse). A constant model that always
594
594
predicts the expected value of y, disregarding the input features,
595
- would get a R^2 score of 0.0.
595
+ would get a :math:` R^2` score of 0.0.
596
596
597
597
Read more in the :ref:`User Guide <r2_score>`.
598
598
@@ -630,15 +630,15 @@ def r2_score(y_true, y_pred, *, sample_weight=None,
630
630
Returns
631
631
-------
632
632
z : float or ndarray of floats
633
- The R^2 score or ndarray of scores if 'multioutput' is
633
+ The :math:` R^2` score or ndarray of scores if 'multioutput' is
634
634
'raw_values'.
635
635
636
636
Notes
637
637
-----
638
638
This is not a symmetric function.
639
639
640
- Unlike most other scores, R^2 score may be negative (it need not actually
641
- be the square of a quantity R).
640
+ Unlike most other scores, :math:` R^2` score may be negative (it need not
641
+ actually be the square of a quantity R).
642
642
643
643
This metric is not well-defined for single samples and will return a NaN
644
644
value if n_samples is less than two.
0 commit comments