Skip to content

Commit 438da79

Browse files
authored
Add docs interlinks (#131)
* Add DocumenterInterLinks as docs dependency * Add docs interlinks * Add external references to methods * Use interlinking to link to MLJ docs * Increment patch number
1 parent 9d3e4ca commit 438da79

File tree

6 files changed

+26
-11
lines changed

6 files changed

+26
-11
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MCMCDiagnosticTools"
22
uuid = "be115224-59cd-429b-ad48-344e309966f0"
33
authors = ["David Widmann", "Seth Axen"]
4-
version = "0.3.12"
4+
version = "0.3.13"
55

66
[deps]
77
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

docs/Project.toml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
34
EvoTrees = "f6006082-12f8-11e9-0c9c-0d5d367ab1e5"
45
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
56
MLJIteration = "614be32b-d00c-4edb-bd02-1eb411ab5e55"
@@ -9,6 +10,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
910

1011
[compat]
1112
Documenter = "1"
13+
DocumenterInterLinks = "1"
1214
EvoTrees = "0.15, 0.16"
1315
MLJBase = "0.20, 0.21, 1"
1416
MLJIteration = "0.5, 0.6"

docs/make.jl

+11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Documenter
2+
using DocumenterInterLinks
23

34
# Print `@debug` statements (https://github.com/JuliaDocs/Documenter.jl/issues/955)
45
if haskey(ENV, "GITHUB_ACTIONS")
@@ -11,6 +12,15 @@ DocMeta.setdocmeta!(
1112
MCMCDiagnosticTools, :DocTestSetup, :(using MCMCDiagnosticTools); recursive=true
1213
)
1314

15+
links = InterLinks(
16+
"MLJ" => "https://juliaai.github.io/MLJ.jl/stable/",
17+
"Statistics" => "https://docs.julialang.org/en/v1/",
18+
"StatsBase" => (
19+
"https://juliastats.org/StatsBase.jl/stable/",
20+
"https://juliastats.org/StatsBase.jl/dev/objects.inv",
21+
),
22+
)
23+
1424
makedocs(;
1525
modules=[MCMCDiagnosticTools],
1626
authors="David Widmann",
@@ -24,6 +34,7 @@ makedocs(;
2434
pages=["Home" => "index.md"],
2535
warnonly=:footnote,
2636
checkdocs=:exports,
37+
plugins=[links],
2738
)
2839

2940
deploydocs(;

src/ess_rhat.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ If `kind` isa a `Symbol`, it may take one of the following values:
248248
distributed. This transform is monotonic.
249249
250250
Otherwise, `kind` specifies one of the following estimators, whose ESS is to be estimated:
251-
- `Statistics.mean`
252-
- `Statistics.median`
253-
- `Statistics.std`
254-
- `StatsBase.mad`
251+
- [`Statistics.mean`](@extref)
252+
- [`Statistics.median`](@extref)
253+
- [`Statistics.std`](@extref)
254+
- [`StatsBase.mad`](@extref)
255255
- `Base.Fix2(Statistics.quantile, p::Real)`
256256
257257
[^VehtariGelman2021]: Vehtari, A., Gelman, A., Simpson, D., Carpenter, B., & Bürkner, P. C. (2021).

src/mcse.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ vector of the same `eltype` as `samples` and return a real estimate.
1717
For the following estimators, the effective sample size [`ess`](@ref) and an estimate
1818
of the asymptotic variance are used to compute the MCSE, and `kwargs` are forwarded to
1919
`ess`:
20-
- `Statistics.mean`
21-
- `Statistics.median`
22-
- `Statistics.std`
20+
- [`Statistics.mean`](@extref)
21+
- [`Statistics.median`](@extref)
22+
- [`Statistics.std`](@extref)
2323
- `Base.Fix2(Statistics.quantile, p::Real)`
2424
2525
For other estimators, the subsampling bootstrap method (SBM)[^FlegalJones2011][^Flegal2012]

src/rstar.jl

+5-3
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Compute the ``R^*`` convergence statistic of the `samples` with the `classifier`
138138
This implementation is an adaption of algorithms 1 and 2 described by Lambert and Vehtari.
139139
140140
The `classifier` has to be a supervised classifier of the MLJ framework (see the
141-
[MLJ documentation](https://alan-turing-institute.github.io/MLJ.jl/dev/list_of_supported_models/#model_list)
141+
[MLJ documentation](@extref MLJ list_of_supported_models)
142142
for a list of supported models). It is trained with a `subset` of the samples from each
143143
chain. Each chain is split into `split_chains` separate chains to additionally check for
144144
within-chain convergence. The training of the classifier can be inspected by adjusting the
@@ -175,7 +175,8 @@ julia> round(mean(distribution); digits=2)
175175
```
176176
177177
Note, however, that it is recommended to determine `nrounds` based on early-stopping.
178-
With the MLJ framework, this can be achieved in the following way (see the [MLJ documentation](https://alan-turing-institute.github.io/MLJ.jl/dev/controlling_iterative_models/) for additional explanations):
178+
With the MLJ framework, this can be achieved in the following way (see the
179+
[MLJ documentation](@extref MLJ Controlling-Iterative-Models) for additional explanations):
179180
180181
```jldoctest rstar
181182
julia> model = IteratedModel(;
@@ -195,7 +196,8 @@ julia> round(mean(distribution); digits=2)
195196
196197
For deterministic classifiers, a single ``R^*`` statistic (algorithm 1) is returned.
197198
Deterministic classifiers can also be derived from probabilistic classifiers by e.g.
198-
predicting the mode. In MLJ this corresponds to a pipeline of models.
199+
predicting the mode. In MLJ this corresponds to a [pipeline](@extref MLJ Pipeline_MLJBase)
200+
of models.
199201
200202
```jldoctest rstar
201203
julia> evotree_deterministic = Pipeline(model; operation=predict_mode);

0 commit comments

Comments
 (0)