You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use a ReCA model, it is necessary to define the rule one intends to use. To do so, ReservoirComputing.jl leverages [CellularAutomata.jl](https://github.com/MartinuzziFrancesco/CellularAutomata.jl) that needs to be called as well to define the `RECA` struct:
19
19
20
20
```@example reca
21
-
using ReservoirComputing, CellularAutomata
21
+
using ReservoirComputing, CellularAutomata, Random
22
+
Random.seed!(42)
23
+
rng = MersenneTwister(17)
22
24
23
25
ca = DCA(90)
24
26
```
25
27
26
28
To define the ReCA model, it suffices to call:
27
29
28
30
```@example reca
29
-
reca = RECA(input, ca;
30
-
generations=16,
31
-
input_encoding=RandomMapping(16, 40))
31
+
reca = RECA(4, 4, DCA(90);
32
+
generations=16,
33
+
input_encoding=RandomMapping(16, 40))
34
+
ps, st = setup(rng, reca)
32
35
```
33
-
34
36
After this, the training can be performed with the chosen method.
ps, st = train!(reca, input, output, ps, st, StandardRidge(0.00001))
38
40
```
39
41
40
-
The prediction in this case will be a `Predictive()` with the input data equal to the training data. In addition, to test the 5 bit memory task, a conversion from Float to Bool is necessary (at the moment, we are aware of a bug that doesn't allow boolean input data to the RECA models):
42
+
We are going to test the recall ability of the model, feeding the input data
43
+
and investigating wether the predicted output equals the output data.
44
+
In addition, to test the 5 bit memory task, a conversion from Float to Bool
45
+
is necessary (at the moment, we are aware of a bug that doesn't allow boolean
0 commit comments