Skip to content

Commit 638845c

Browse files
committed
RC model docstring updates for sphinx, but still need to update methods themselves
1 parent afaff7a commit 638845c

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

dabench/model/_rc.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def generate(self, state_vec, A=None, Win=None, r0=None):
183183
If False, returns states. Default: False.
184184
185185
Returns:
186-
r (array_like): (time_dim, reservoir_dim), reservoir state
186+
Reservoirs state, size (time_dim, reservoir_dim)
187187
"""
188188
u = state_vec.to_stacked_array('system',['time']).data
189189
r = np.zeros((u.shape[0], self.reservoir_dim))
@@ -215,7 +215,7 @@ def update(self, r, u, A=None, Win=None):
215215
reservoir input weight matrix. If None, uses self.Win.
216216
Default is None
217217
Returns:
218-
q (array_like): (reservoir_dim,) Reservoir state at next time step
218+
Reservoir state at next time step, of size (reservoir_dim,)
219219
"""
220220

221221
if A is None:
@@ -249,8 +249,7 @@ def predict(self, state_vec, delta_t, initial_index=0, n_steps=100,
249249
r0 (array_like, optional): initial reservoir state
250250
251251
Returns:
252-
dataobj_pred (vector.StateVector): StateVector object covering
253-
prediction period
252+
Data object covering prediction period
254253
"""
255254

256255
# Recompute the initial reservoir spinup to get reservoir states
@@ -298,8 +297,8 @@ def readout(self, rt, Wout=None, utm1=None):
298297
then Wout*[1, u(t-1), r(t)]=u(t)
299298
300299
Returns:
301-
vt (array_like): 1D or 2D with dims: (Nout,) or (Ntime, Nout)
302-
depending on shape of input array
300+
1D or 2D array with dims(Nout,) or (Ntime, Nout)
301+
depending on shape of input array
303302
304303
Todo:
305304
generalize similar to DiffRC
@@ -352,7 +351,7 @@ def _predict_backend(self, n_samples, s_last, u_last, delta_t,
352351
uses self.Wout. Default is None.
353352
354353
Returns:
355-
y (Data): data object with predicted signal from reservoir
354+
Data object with predicted signal from reservoir
356355
"""
357356

358357
s = jnp.zeros((n_samples, self.reservoir_dim))
@@ -402,8 +401,8 @@ def _compute_Wout(self, rt, y, update_Wout=True, u=None):
402401
initialize it by rewriting the ybar and sbar matrices
403402
404403
Returns:
405-
Wout (array_like): 2D with dims (output_dim, reservoir_dim),
406-
this is also stored within the object
404+
Wout array, 2D with dims (output_dim, reservoir_dim),
405+
this is also stored within the object
407406
408407
Sets Attributes:
409408
ybar (array_like): y.T @ st, st is rt with readout_method accounted
@@ -475,7 +474,7 @@ def _linsolve_pinv(self, X, Y, beta=None):
475474
Y : dependent variable, square matrix
476475
477476
Returns:
478-
A : Solution matrix, rectangular matrix
477+
Solution matrix, rectangular matrix
479478
"""
480479
if beta is not None:
481480
Xinv = linalg.pinv(X+beta*np.eye(X.shape[0]))

0 commit comments

Comments
 (0)