{"action":"created","issue":{"url":"https://api.github.com/repos/natekupp/ffx/issues/21","repository_url":"https://api.github.com/repos/natekupp/ffx","labels_url":"https://api.github.com/repos/natekupp/ffx/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/natekupp/ffx/issues/21/comments","events_url":"https://api.github.com/repos/natekupp/ffx/issues/21/events","html_url":"https://github.com/natekupp/ffx/issues/21","id":186959856,"number":21,"title":"fail to real time series","user":{"login":"hfl15","id":18208884,"avatar_url":"https://avatars.githubusercontent.com/u/18208884?v=3","gravatar_id":"","url":"https://api.github.com/users/hfl15","html_url":"https://github.com/hfl15","followers_url":"https://api.github.com/users/hfl15/followers","following_url":"https://api.github.com/users/hfl15/following{/other_user}","gists_url":"https://api.github.com/users/hfl15/gists{/gist_id}","starred_url":"https://api.github.com/users/hfl15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hfl15/subscriptions","organizations_url":"https://api.github.com/users/hfl15/orgs","repos_url":"https://api.github.com/users/hfl15/repos","events_url":"https://api.github.com/users/hfl15/events{/privacy}","received_events_url":"https://api.github.com/users/hfl15/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-03T01:11:18Z","updated_at":"2016-11-03T14:23:25Z","closed_at":"2016-11-03T14:20:27Z","body":"Hello. I have a time series 'x', I use np.gradient to calculate dx/dt, then I want to learn a function like that dx/dt=f(x). In this case here, for the FFX, target is the dx/dt, and trainx, testx is the original time series. But I face with the problem as follow. It is no problem to do the same things with the model dx/dt = 0.2x.\r\n\r\nThe problem as follow:\r\n--------------------------------------------------------------------------\r\nIndexError                                Traceback (most recent call last)\r\n<ipython-input-56-dcb9ab15feb3> in <module>()\r\n      4 test_y = dx[101::]\r\n      5 varnames = 'x'\r\n----> 6 dxdt_fitted_result = run_ffx(train_x,train_y,test_x,test_y,varnames)\r\n\r\n<ipython-input-35-ef91da4761f0> in run_ffx(train_X, train_y, test_X, test_y, varnames)\r\n      3 \r\n      4 def run_ffx(train_X, train_y, test_X, test_y, varnames):\r\n----> 5     models = ffx.run(train_X, train_y, test_X, test_y, varnames)\r\n      6     base = [model.numBases() for model in models]\r\n      7     test_error = [model.test_nmse for model in models]\r\n\r\n/home/happyling/anaconda3/lib/python3.5/site-packages/ffx/api.py in run(train_X, train_y, test_X, test_y, varnames, verbose)\r\n      2 \r\n      3 def run(train_X, train_y, test_X, test_y, varnames=None, verbose=False):\r\n----> 4     return core.MultiFFXModelFactory().build(train_X, train_y, test_X, test_y, varnames, verbose)\r\n\r\n/home/happyling/anaconda3/lib/python3.5/site-packages/ffx/core.py in build(self, train_X, train_y, test_X, test_y, varnames, verbose)\r\n    557             ss = FFXBuildStrategy(approach)\r\n    558 \r\n--> 559             next_models = FFXModelFactory().build(train_X, train_y, ss, varnames, verbose)\r\n    560 \r\n    561             # set test_nmse on each model\r\n\r\n/home/happyling/anaconda3/lib/python3.5/site-packages/ffx/core.py in build(self, X, y, ss, varnames, verbose)\r\n    658                 #'lin' version of base\r\n    659                 simple_base = SimpleBase(var_i, exponent)\r\n--> 660                 lin_yhat = simple_base.simulate(X)\r\n    661                 # checking exponent is a speedup\r\n    662                 if exponent in [1.0, 2.0] or not yIsPoor(lin_yhat):\r\n\r\n/home/happyling/anaconda3/lib/python3.5/site-packages/ffx/core.py in simulate(self, X)\r\n    314           y -- 1d array of [sample_i] : float\r\n    315         \"\"\"\r\n--> 316         return X[:, self.var] ** self.exponent\r\n    317 \r\n    318     def __str__(self):\r\n\r\nIndexError: too many indices for array\r\n"},"comment":{"url":"https://api.github.com/repos/natekupp/ffx/issues/comments/258156345","html_url":"https://github.com/natekupp/ffx/issues/21#issuecomment-258156345","issue_url":"https://api.github.com/repos/natekupp/ffx/issues/21","id":258156345,"user":{"login":"jmmcd","id":167942,"avatar_url":"https://avatars.githubusercontent.com/u/167942?v=3","gravatar_id":"","url":"https://api.github.com/users/jmmcd","html_url":"https://github.com/jmmcd","followers_url":"https://api.github.com/users/jmmcd/followers","following_url":"https://api.github.com/users/jmmcd/following{/other_user}","gists_url":"https://api.github.com/users/jmmcd/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmcd/subscriptions","organizations_url":"https://api.github.com/users/jmmcd/orgs","repos_url":"https://api.github.com/users/jmmcd/repos","events_url":"https://api.github.com/users/jmmcd/events{/privacy}","received_events_url":"https://api.github.com/users/jmmcd/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T14:23:25Z","updated_at":"2016-11-03T14:23:25Z","body":"(BTW use three backquotes to format blocks of code, and BTW `run_ffx` should be `ffx.run`.)"}}
{"actor":{"display_login":"jmmcd"}}