{"action":"closed","issue":{"url":"https://api.github.com/repos/kalekiu/easyesn/issues/4","repository_url":"https://api.github.com/repos/kalekiu/easyesn","labels_url":"https://api.github.com/repos/kalekiu/easyesn/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/kalekiu/easyesn/issues/4/comments","events_url":"https://api.github.com/repos/kalekiu/easyesn/issues/4/events","html_url":"https://github.com/kalekiu/easyesn/issues/4","id":371690369,"node_id":"MDU6SXNzdWUzNzE2OTAzNjk=","number":4,"title":"Example of generative task with many features","user":{"login":"thild","id":338795,"node_id":"MDQ6VXNlcjMzODc5NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/338795?v=4","gravatar_id":"","url":"https://api.github.com/users/thild","html_url":"https://github.com/thild","followers_url":"https://api.github.com/users/thild/followers","following_url":"https://api.github.com/users/thild/following{/other_user}","gists_url":"https://api.github.com/users/thild/gists{/gist_id}","starred_url":"https://api.github.com/users/thild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thild/subscriptions","organizations_url":"https://api.github.com/users/thild/orgs","repos_url":"https://api.github.com/users/thild/repos","events_url":"https://api.github.com/users/thild/events{/privacy}","received_events_url":"https://api.github.com/users/thild/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-18T20:04:55Z","updated_at":"2018-10-23T10:09:25Z","closed_at":"2018-10-23T10:09:25Z","author_association":"NONE","body":"Hi,\r\n\r\nFirst of all, thanks for creating this great library.\r\n\r\nI'm trying to predict a temporal series based on a chaotic system using generative task. My system have many features but I'm unable to generate the output with more than one feature. \r\n\r\nThe data was loaded with pandas. ```inputDataTraining``` and ```inputDataValidation``` are pandas DataFrames.\r\n\r\nCould you create a example o generating task with more than one feature?\r\n\r\nThanks\r\n\r\n```python\r\nesn = PredictionESN(n_input=0, n_output=2, n_reservoir=50, spectralRadius=0.9, leakingRate=0.2, regressionParameters=[1e-1], solver=\"pinv\", feedback=True)\r\n\r\nesn.fit(None, inputDataTraining, transientTime=2500, verbose=1)\r\n\r\ngeneration = esn.generate(n=len(inputDataValidation), inputData=None, initialOutputData=inputDataTraining[-1])\r\n```\r\n```shell\r\nTraceback (most recent call last):\r\n  File \"echo2.py\", line 50, in <module>\r\n    generation = esn.generate(n=len(inputDataValidation), inputData=None, initialOutputData=inputDataTraining)\r\n  File \"/home/tony/.local/lib/python3.6/site-packages/easyesn/PredictionESN.py\", line 223, in generate\r\n    _, Y = self.propagate(inputData, None, verbose=verbose, steps=n, previousOutputData=initialOutputData)\r\n  File \"/home/tony/.local/lib/python3.6/site-packages/easyesn/BaseESN.py\", line 125, in propagate\r\n    self.update(None, previousOutputData, x=x)\r\n  File \"/home/tony/.local/lib/python3.6/site-packages/easyesn/BaseESN.py\", line 326, in update\r\n    outputData = outputData.reshape(self.n_output, 1)\r\n  File \"/home/tony/.local/lib/python3.6/site-packages/pandas/core/generic.py\", line 4376, in __getattr__\r\n    return object.__getattribute__(self, name)\r\nAttributeError: 'DataFrame' object has no attribute 'reshape'\r\n```\r\n\r\nIf I change inputDataTraining[-1] to inputDataTraining.values[-1] I get:\r\n\r\n```shell\r\nTraceback (most recent call last):\r\n  File \"echo2.py\", line 46, in <module>\r\n    generation = esn.generate(n=len(inputDataValidation), inputData=None, initialOutputData=inputDataTraining.values[-1])\r\n  File \"/home/tony/.local/lib/python3.6/site-packages/easyesn/PredictionESN.py\", line 223, in generate\r\n    _, Y = self.propagate(inputData, None, verbose=verbose, steps=n, previousOutputData=initialOutputData)\r\n  File \"/home/tony/.local/lib/python3.6/site-packages/easyesn/BaseESN.py\", line 136, in propagate\r\n    Y[t-transientTime, :] = previousOutputData\r\nValueError: could not broadcast input array from shape (2,1) into shape (2)\r\n\r\n```"}}
{"actor":{"display_login":"FlashTek"}}