{"action":"closed","issue":{"url":"https://api.github.com/repos/convexengineering/gpfit/issues/84","repository_url":"https://api.github.com/repos/convexengineering/gpfit","labels_url":"https://api.github.com/repos/convexengineering/gpfit/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/convexengineering/gpfit/issues/84/comments","events_url":"https://api.github.com/repos/convexengineering/gpfit/issues/84/events","html_url":"https://github.com/convexengineering/gpfit/issues/84","id":361009994,"node_id":"MDU6SXNzdWUzNjEwMDk5OTQ=","number":84,"title":"Ali and I are breaking the multi-dimensional fits","user":{"login":"1ozturkbe","id":15684191,"node_id":"MDQ6VXNlcjE1Njg0MTkx","avatar_url":"https://avatars0.githubusercontent.com/u/15684191?v=4","gravatar_id":"","url":"https://api.github.com/users/1ozturkbe","html_url":"https://github.com/1ozturkbe","followers_url":"https://api.github.com/users/1ozturkbe/followers","following_url":"https://api.github.com/users/1ozturkbe/following{/other_user}","gists_url":"https://api.github.com/users/1ozturkbe/gists{/gist_id}","starred_url":"https://api.github.com/users/1ozturkbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ozturkbe/subscriptions","organizations_url":"https://api.github.com/users/1ozturkbe/orgs","repos_url":"https://api.github.com/users/1ozturkbe/repos","events_url":"https://api.github.com/users/1ozturkbe/events{/privacy}","received_events_url":"https://api.github.com/users/1ozturkbe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-09-17T19:30:14Z","updated_at":"2018-09-17T20:15:30Z","closed_at":"2018-09-17T20:15:30Z","author_association":"CONTRIBUTOR","body":"It seems to work for univariate fits, but not for multivariate ones. \r\nThe code is [here](https://github.com/1ozturkbe/EGPAnet), under Code/frictionFactorFitting.py. When we run it, we get the following error:\r\n```python\r\nIn [23]: run frictionFactorFitting.py\r\n---------------------------------------------------------------------------\r\nIndexError                                Traceback (most recent call last)\r\nC:\\Users\\Berk\\Dropbox (MIT)\\MIT Graduate School\\code\\EGPAnet\\code\\frictionFactorFitting.py in <module>()\r\n     23\r\n     24 K = 3\r\n---> 25 cMA, errorMA = fit(xData, z, K, \"MA\")\r\n     26 cSMA, errorSMA = fit(xData, z, K, \"SMA\")\r\n     27 cISMA, errorISMA = fit(xData, z, K, \"ISMA\")\r\n\r\nc:\\users\\berk\\dropbox (mit)\\mit graduate school\\code\\gpfit\\gpfit\\fit.pyc in fit(xdata, ydata, K, ftype)\r\n     78             fitdata[\"ub%d\" % i] = exp(max(xdata.T[i]))\r\n     79\r\n---> 80     params = get_params(ftype, K, xdata, ydata)\r\n     81\r\n     82     # A: exponent parameters, B: coefficient parameters\r\n\r\nc:\\users\\berk\\dropbox (mit)\\mit graduate school\\code\\gpfit\\gpfit\\fit.pyc in get_params(ftype, K, xdata, ydata)\r\n     23         return r, drdp\r\n     24\r\n---> 25     ba = ba_init(xdata, ydata.reshape(ydata.size, 1), K).flatten('F')\r\n     26\r\n     27     if ftype == \"ISMA\":\r\n\r\nc:\\users\\berk\\dropbox (mit)\\mit graduate school\\code\\gpfit\\gpfit\\ba_init.pyc in ba_init(x, y, K)\r\n     71             while matrix_rank(X[inds, :]) < dimx+1:\r\n     72                 i = i+1\r\n---> 73                 inds[sortdistind[i]] = 1\r\n     74\r\n     75             if options['bverbose']:\r\n\r\nIndexError: index 1001 is out of bounds for axis 0 with size 1001\r\n```\r\nTried a bunch of hacks, mostly to do with data structures, but nothing worked. Let us know if you have any ideas @bqpd, since the documentation is less than ideal."}}
{"actor":{"display_login":"1ozturkbe"}}