PlasmaControl / PyRCN

A Python 3 framework for Reservoir Computing with a scikit-learn-compatible API.
BSD 3-Clause "New" or "Revised" License
89 stars 19 forks source link

I can't run the PyRCN example #17

Closed Naka2024 closed 3 years ago

Naka2024 commented 3 years ago

When I run the PyRCN / examples / digits.py program in sequence, I get the following error in the 5th cell that optimizes input_scaling and spectrum_radius.

ValueError: Input contains Nan, infinity or a value too large for dtype(‘float64’).

The execution environment is as follows.

ubuntu 18.04.5 LTS

numpy 1.19.2 scipy 1.6.1 scikit-learn 0.24.1 joblib 1.0.1

I haven’t edited the code. Is it an environmental issue? or is there a problem with the example? I would appreciate it if you could answer.

renierts commented 3 years ago

Hi @Naka2024, I think that I have seen this error in the past and it might be due to an old version of PyRCN. Which version of PyRCN and which Python 3.x do you use? Did you use the Jupyter-Notebook or the python script?

Can you send me the Error Traceback as PN?

Naka2024 commented 3 years ago

Dear @renierts

When I checked the version of pyrcn, it was 0.0.6, so I updated it. The current versions of PyRCN and Python are listed below.

PyRCN 0.0.12 Python 3.8.8

I ran the example again but got the following error in the 4th cell. (Sorry, I don't know what the PN is, so here's a screenshot of the error I encountered.)

e

I get the same error in both Jupyter-Notebook and Python scripts.

renierts commented 3 years ago

Dear @Naka2024 thanks for notifying me about this bug. "input_to_nodes" and "nodes_to_nodes" were changed to "input_to_node" and "node_to_node" to better follow the base module naming.

In the dev-Branch, you can already find the updated examples. I will merge this with the main branch tonight together with PyRCN 0.0.13. Sorry for the inconvenience.

renierts commented 3 years ago

The fixed examples are on the master branch now.

Naka2024 commented 3 years ago

Dear @renierts

I have upgraded PyRCN to 0.0.13 and tried to run the master branch example, but I get an error in the last cell.

A screenshot is provided below.

PyRCN_E

I got the same error in Jupyter-Notebook and Python script.

renierts commented 3 years ago

Dear @Naka2024 thanks for pointing that out. This bug was fixed within another issue You can either install PyRCN using setup.py or wait until I notify you that v0.0.14 is released.

renierts commented 3 years ago

v0.0.14 is available now with the updated digits example. Can you please check whether this works and close the issue if that's the case?

Naka2024 commented 3 years ago

Dear @renierts

I updated PyRCN and ran the updated example digits.

The execution of the python script did not produce any error, but the jupyter notebook example produces an error in the last cell. Here is a screenshot.

pyrcn0 0 14Error

renierts commented 3 years ago

Dear @Naka2024 ,

thank you for pointing this out. The last bug is a typo in the previous cell, which should be base_esn = sequential_search.best_estimator_ instead of base_esn = sequential_search.all_best_estimator_, because we aim to use the global best estimator for the final evaluation.

I have updated the notebook on the dev-Branch. Many many thanks for giving me so much feedback regarding this notebook. This definitely helps to improve the quality of PyRCN.

Can you please close the issue if everything works fine now?