kalekiu / easyesn

Python library for Reservoir Computing using Echo State Networks
131 stars 37 forks source link

Accessing reservoir states #12

Closed pfdominey closed 4 years ago

pfdominey commented 4 years ago

Greetings, Thanks for the great system. I am interested in studying the activity of the reservoir units during the time-course of the processing of the input sequence. After training the reservoir we then expose it to a test inputDataTesting

prediction = esn.predict(inputDataTesting)

After this execution, is it possible to have access to the data structure that contains the activations of the reservoir units during the processing of the input? This would be a matrix of NxM where N is the number of reservoir units, and M is the number of time steps during the simulation.

This would be used to analyse the temporal dynamics of the reservoir activity.

Thanks for your help

PF Dominey

(ps - I hope this is an appropriate question for this issue forum - please excuse me if this is out of line)

zimmerrol commented 4 years ago

Hi, this is not possible at the moment. But you can easily add this function to the library! Just modify the last line of the predict function` and change it from

return Y.T 

to

return Y.T, X

Does this solve your problem?

pfdominey commented 4 years ago

Sure does! Thanks: