@@ -177,31 +177,38 @@ function nla(::NLAT2, x_old)
177177 return x_new
178178end
179179
180- """
180+ @doc raw """
181181 NLAT3()
182182
183- The `NLAT3` struct implements the T₃ transformation algorithm as detailed in [^Chattopadhyay].
184- This algorithm modifies the reservoir's states by multiplying each odd-indexed row
185- (beginning from the second row) with the product of the immediately preceding and the
186- immediately following rows. T₃'s unique approach to data transformation makes it particularly
187- useful for enhancing complex data patterns, thereby improving the modeling and analysis
188- capabilities within reservoir computing, especially for chaotic and dynamic systems.
183+ The `NLAT3` struct implements the T₃ transformation algorithm as detailed
184+ in [^Chattopadhyay]. This algorithm modifies the reservoir's states by
185+ multiplying each odd-indexed row (beginning from the second row) with the
186+ product of the immediately preceding and the immediately following rows.
189187
190- Reference:
188+ ```math
189+ \t ilde{r}_{i,j} =
190+ \b egin{cases}
191+ r_{i,j-1} \t imes r_{i,j+1}, & \t ext{if } j > 1 \t ext{ is odd}; \\
192+ r_{i,j}, & \t ext{if } j = 1 \t ext{ or even.}
193+ \e nd{cases}
194+ ```
195+
196+ # Reference:
191197
192198[^Chattopadhyay]: Chattopadhyay, Ashesh, et al.
193- "Data-driven prediction of a multi-scale Lorenz 96 chaotic system using a hierarchy of deep learning methods:
194- Reservoir computing, ANN, and RNN-LSTM." (2019).
199+ "Data-driven predictions of a multiscale Lorenz 96 chaotic system using
200+ machine-learning methods: reservoir computing, artificial neural network,
201+ and long short-term memory network." (2019).
195202"""
196203struct NLAT3 <: NonLinearAlgorithm end
197204
198205function nla (:: NLAT3 , x_old)
199206 x_new = copy (x_old)
200207 for i in 2 : (size (x_new, 1 ) - 1 )
201- if mod (i, 2 ) != 0
202- x_new[i, :] = copy ( x_old[i - 1 , :] .* x_old[i + 1 , :])
208+ if isodd (i)
209+ x_new[i, :] . = x_old[i - 1 , :] .* x_old[i + 1 , :] # Element-wise update
203210 end
204211 end
205-
212+
206213 return x_new
207214end
0 commit comments