Skip to content

Commit 4b82fdc

Browse files
committed
Update r2_score docstring
1 parent 94dd993 commit 4b82fdc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

ext/InferenceObjectsPosteriorStatsExt/r2_score.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@doc """
2-
r2_score(idata::InferenceData; y_name, y_pred_name) -> (; r2, r2_std)
2+
r2_score(idata::InferenceData; y_name, y_pred_name, kwargs...) -> (; r2, <ci>)
33
44
Compute ``R²`` from `idata`, automatically formatting the predictions to the correct shape.
55
@@ -9,8 +9,8 @@ Compute ``R²`` from `idata`, automatically formatting the predictions to the co
99
the only observed data variable is used.
1010
- `y_pred_name`: Name of posterior predictive variable in `idata.posterior_predictive`.
1111
If not provided, then `y_name` is used.
12-
13-
See [`PosteriorStats.r2_score`](@extref) for more details.
12+
- `kwargs...`: Additional keyword arguments to pass to
13+
[`PosteriorStats.r2_score`](@extref).
1414
1515
# Examples
1616
@@ -19,10 +19,8 @@ julia> using ArviZExampleData, PosteriorStats
1919
2020
julia> idata = load_example_data("regression10d");
2121
22-
julia> r2_score(idata) |> pairs
23-
pairs(::NamedTuple) with 2 entries:
24-
:r2 => 0.998385
25-
:r2_std => 0.000100621
22+
julia> r2_score(idata)
23+
(r2 = 0.998384805658226, eti = 0.9982167674001565 .. 0.9985401916739318)
2624
```
2725
"""
2826
function PosteriorStats.r2_score(

0 commit comments

Comments
 (0)