Skip to content

Commit d157f1e

Browse files
Merge pull request #287 from SciML/fm/docs
docs: uniform citations in docs with DocumenterCitations
2 parents bcecae7 + 556781e commit d157f1e

File tree

20 files changed

+503
-252
lines changed

20 files changed

+503
-252
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ReservoirComputing"
22
uuid = "7c2d2b1e-3dd4-11ea-355a-8f6a8116e294"
33
authors = ["Francesco Martinuzzi"]
4-
version = "0.11.2"
4+
version = "0.11.3"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

README.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,38 @@ Use the
2727
[in-development documentation](https://docs.sciml.ai/ReservoirComputing/dev/)
2828
to take a look at not yet released features.
2929

30+
## Citing
31+
32+
If you use this library in your work, please cite:
33+
34+
```bibtex
35+
@article{martinuzzi2022reservoircomputing,
36+
author = {Francesco Martinuzzi and Chris Rackauckas and Anas Abdelrehim and Miguel D. Mahecha and Karin Mora},
37+
title = {ReservoirComputing.jl: An Efficient and Modular Library for Reservoir Computing Models},
38+
journal = {Journal of Machine Learning Research},
39+
year = {2022},
40+
volume = {23},
41+
number = {288},
42+
pages = {1--8},
43+
url = {http://jmlr.org/papers/v23/22-0611.html}
44+
}
45+
```
46+
47+
## Installation
48+
49+
ReservoirComputing.jl can be installed using either of
50+
51+
```julia_repl
52+
julia> ] #actually press the closing square brackets
53+
pkg> add ReservoirComputing
54+
```
55+
or
56+
57+
```julia
58+
using Pkg
59+
Pkg.add("ReservoirComputing")
60+
```
61+
3062
## Quick Example
3163

3264
To illustrate the workflow of this library we will showcase
@@ -36,7 +68,9 @@ For the `Generative` prediction we need the target data
3668
to be one step ahead of the training data:
3769

3870
```julia
39-
using ReservoirComputing, OrdinaryDiffEq
71+
using ReservoirComputing, OrdinaryDiffEq, Random
72+
Random.seed!(42)
73+
rng = MersenneTwister(17)
4074

4175
#lorenz system parameters
4276
u0 = [1.0, 0.0, 0.0]
@@ -74,7 +108,8 @@ res_size = 300
74108
esn = ESN(input_data, input_size, res_size;
75109
reservoir=rand_sparse(; radius=1.2, sparsity=6 / res_size),
76110
input_layer=weighted_init,
77-
nla_type=NLAT2())
111+
nla_type=NLAT2(),
112+
rng=rng)
78113
```
79114

80115
The echo state network can now be trained and tested.
@@ -110,23 +145,6 @@ plot!(transpose(test)[:, 1], transpose(test)[:, 2], transpose(test)[:, 3]; label
110145

111146
![lorenz_attractor](https://user-images.githubusercontent.com/10376688/81470281-5a34b580-91ea-11ea-9eea-d2b266da19f4.png)
112147

113-
## Citing
114-
115-
If you use this library in your work, please cite:
116-
117-
```bibtex
118-
@article{JMLR:v23:22-0611,
119-
author = {Francesco Martinuzzi and Chris Rackauckas and Anas Abdelrehim and Miguel D. Mahecha and Karin Mora},
120-
title = {ReservoirComputing.jl: An Efficient and Modular Library for Reservoir Computing Models},
121-
journal = {Journal of Machine Learning Research},
122-
year = {2022},
123-
volume = {23},
124-
number = {288},
125-
pages = {1--8},
126-
url = {http://jmlr.org/papers/v23/22-0611.html}
127-
}
128-
```
129-
130148
## Acknowledgements
131149

132150
This project was possible thanks to initial funding through

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
CellularAutomata = "878138dc-5b27-11ea-1a71-cb95d38d6b29"
33
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
44
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
5+
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
56
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
67
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
78
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

docs/make.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Documenter, ReservoirComputing
1+
using Documenter, DocumenterCitations, ReservoirComputing
22

33
cp("./docs/Manifest.toml", "./docs/src/assets/Manifest.toml"; force = true)
44
cp("./docs/Project.toml", "./docs/src/assets/Project.toml"; force = true)
@@ -8,9 +8,15 @@ ENV["GKSwstype"] = "100"
88
include("pages.jl")
99
mathengine = Documenter.MathJax()
1010

11+
bib = CitationBibliography(
12+
joinpath(@__DIR__, "src", "refs.bib");
13+
style = :authoryear
14+
)
15+
1116
makedocs(; modules = [ReservoirComputing],
1217
sitename = "ReservoirComputing.jl",
1318
clean = true, doctest = false, linkcheck = true,
19+
plugins = [bib],
1420
format = Documenter.HTML(;
1521
mathengine,
1622
assets = ["assets/favicon.ico"],

docs/pages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ pages = [
2020
"ESN Initializers" => "api/inits.md",
2121
"ESN Drivers" => "api/esn_drivers.md",
2222
"ESN Variations" => "api/esn_variations.md",
23-
"ReCA" => "api/reca.md"]
23+
"ReCA" => "api/reca.md"] #"References" => "references.md"
2424
]

docs/src/api/esn_drivers.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@ The `GRU` driver also provides the user with the choice of the possible variants
1414
```
1515

1616
Please refer to the original papers for more detail about these architectures.
17+
18+
## References
19+
20+
```@bibliography
21+
Pages = ["esn_drivers.md"]
22+
Canonical = false
23+
```

docs/src/api/inits.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@
4444
self_loop!
4545
add_jumps!
4646
```
47+
48+
## References
49+
50+
```@bibliography
51+
Pages = ["inits.md"]
52+
Canonical = false
53+
```

docs/src/api/states.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@
2525
```@docs
2626
ReservoirComputing.create_states
2727
```
28+
29+
## References
30+
31+
```@bibliography
32+
Pages = ["states.md"]
33+
Canonical = false
34+
```

docs/src/esn_tutorials/change_layers.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Custom layers only need to follow these APIs to be compatible with ReservoirComp
2626

2727
## Example of minimally complex ESN
2828

29-
Using [^rodan2012] and [^rodan2010] as references this section will provide an
29+
Using [Rodan2012](@cite) and [Rodan2011](@cite) as references this section will provide an
3030
example on how to change both the input layer and the reservoir for ESNs.
3131

3232
The task for this example will be the one step ahead prediction of the Henon map.
@@ -77,11 +77,9 @@ end
7777
As it is possible to see, changing layers in ESN models is straightforward.
7878
Be sure to check the API documentation for a full list of reservoir and layers.
7979

80-
## Bibliography
80+
## References
8181

82-
[^rodan2012]: Rodan, Ali, and Peter Tiňo.
83-
“Simple deterministically constructed cycle reservoirs with regular jumps.”
84-
Neural computation 24.7 (2012): 1822-1852.
85-
[^rodan2010]: Rodan, Ali, and Peter Tiňo.
86-
“Minimum complexity echo state network.”
87-
IEEE transactions on neural networks 22.1 (2010): 131-144.
82+
```@bibliography
83+
Pages = ["change_layers.md"]
84+
Canonical = false
85+
```

docs/src/esn_tutorials/deep_esn.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Deep Echo State Network architectures started to gain some traction recently. In this guide, we illustrate how it is possible to use ReservoirComputing.jl to build a deep ESN.
44

5-
The network implemented in this library is taken from [^1]. It works by stacking reservoirs on top of each other, feeding the output from one into the next. The states are obtained by merging all the inner states of the stacked reservoirs. For a more in-depth explanation, refer to the paper linked above.
5+
The network implemented in this library is taken from [Gallicchio2017](@cite). It works by stacking reservoirs on top of each other, feeding the output from one into the next. The states are obtained by merging all the inner states of the stacked reservoirs. For a more in-depth explanation, refer to the paper linked above.
66

77
## Lorenz Example
88

@@ -88,6 +88,9 @@ plot(p1, p2, p3; plot_title="Lorenz System Coordinates",
8888
legendfontsize=12, titlefontsize=20)
8989
```
9090

91-
## Documentation
91+
## References
9292

93-
[^1]: Gallicchio, Claudio, and Alessio Micheli. "_Deep echo state network (deepesn): A brief survey._" arXiv preprint arXiv:1712.04323 (2017).
93+
```@bibliography
94+
Pages = ["deep_esn.md"]
95+
Canonical = false
96+
```

0 commit comments

Comments
 (0)