Closed 1ozturkbe closed 5 years ago
btw, we left the code verbatim the same as Mike's solar fitting codes. This is why there is all kinds of weird operations on the arrays. So by extension, none of his codes work.
Maybe look at the gplibrary drag polars? I think this may be something to do with the way your arrays are input...
On Mon, Sep 17, 2018 at 3:30 PM, Berk Ozturk notifications@github.com wrote:
It seems to work for univariate fits, but not for multivariate ones. The code is here https://github.com/1ozturkbe/EGPAnet, under Code/frictionFactorFitting.py. When we run it, we get the following error:
In [23]: run frictionFactorFitting.py---------------------------------------------------------------------------IndexError Traceback (most recent call last) C:\Users\Berk\Dropbox (MIT)\MIT Graduate School\code\EGPAnet\code\frictionFactorFitting.py in
() 23 24 K = 3---> 25 cMA, errorMA = fit(xData, z, K, "MA") 26 cSMA, errorSMA = fit(xData, z, K, "SMA") 27 cISMA, errorISMA = fit(xData, z, K, "ISMA") c:\users\berk\dropbox (mit)\mit graduate school\code\gpfit\gpfit\fit.pyc in fit(xdata, ydata, K, ftype) 78 fitdata["ub%d" % i] = exp(max(xdata.T[i])) 79---> 80 params = get_params(ftype, K, xdata, ydata) 81 82 # A: exponent parameters, B: coefficient parameters
c:\users\berk\dropbox (mit)\mit graduate school\code\gpfit\gpfit\fit.pyc in get_params(ftype, K, xdata, ydata) 23 return r, drdp 24---> 25 ba = ba_init(xdata, ydata.reshape(ydata.size, 1), K).flatten('F') 26 27 if ftype == "ISMA":
c:\users\berk\dropbox (mit)\mit graduate school\code\gpfit\gpfit\ba_init.pyc in ba_init(x, y, K) 71 while matrix_rank(X[inds, :]) < dimx+1: 72 i = i+1---> 73 inds[sortdistind[i]] = 1 74 75 if options['bverbose']: IndexError: index 1001 is out of bounds for axis 0 with size 1001
Tried a bunch of hacks, mostly to do with data structures, but nothing worked. Let us know if you have any ideas @bqpd https://github.com/bqpd, since the documentation is s***.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/convexengineering/gpfit/issues/84, or mute the thread https://github.com/notifications/unsubscribe-auth/ABagGO0LO8_3VthHu4kuZGWilnF7qz2Kks5ub_hIgaJpZM4Wsj-_ .
hmm, try running his codes to verify that
On Mon, Sep 17, 2018 at 3:32 PM, Berk Ozturk notifications@github.com wrote:
btw, we left the code verbatim the same as Mike's solar fitting codes. This is why there is all kinds of weird operations on the arrays. So by extension, none of his codes work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/convexengineering/gpfit/issues/84#issuecomment-422141429, or mute the thread https://github.com/notifications/unsubscribe-auth/ABagGFa2kt2om_69SlKpxCnhF3HGV2geks5ub_jWgaJpZM4Wsj-_ .
(or link to the file of his you based this on and I'll verify tonight)
On Mon, Sep 17, 2018 at 3:33 PM, Edward Burnell eburn@mit.edu wrote:
hmm, try running his codes to verify that
On Mon, Sep 17, 2018 at 3:32 PM, Berk Ozturk notifications@github.com wrote:
btw, we left the code verbatim the same as Mike's solar fitting codes. This is why there is all kinds of weird operations on the arrays. So by extension, none of his codes work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/convexengineering/gpfit/issues/84#issuecomment-422141429, or mute the thread https://github.com/notifications/unsubscribe-auth/ABagGFa2kt2om_69SlKpxCnhF3HGV2geks5ub_jWgaJpZM4Wsj-_ .
I'm pretty sure all those fits are tested in the model tests
On Mon, Sep 17, 2018 at 3:34 PM, Edward Burnell eburn@mit.edu wrote:
(or link to the file of his you based this on and I'll verify tonight)
On Mon, Sep 17, 2018 at 3:33 PM, Edward Burnell eburn@mit.edu wrote:
hmm, try running his codes to verify that
On Mon, Sep 17, 2018 at 3:32 PM, Berk Ozturk notifications@github.com wrote:
btw, we left the code verbatim the same as Mike's solar fitting codes. This is why there is all kinds of weird operations on the arrays. So by extension, none of his codes work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/convexengineering/gpfit/issues/84#issuecomment-422141429, or mute the thread https://github.com/notifications/unsubscribe-auth/ABagGFa2kt2om_69SlKpxCnhF3HGV2geks5ub_jWgaJpZM4Wsj-_ .
For starters, the data required for the fit in gplibrary\gpkitmodels\GP\aircraft\wing\jho1polars.py does not exist (it requires a "jho1.ncrit09.Re%dk.pol" file), making it impossible to confirm if it actually works.
oh dang. @mjburton11, could you take a look?
On Mon, Sep 17, 2018 at 3:42 PM, Berk Ozturk notifications@github.com wrote:
For starters, the data required for the fit in gplibrary\gpkitmodels\GP\aircraft\wing\jho1polars.py does not exist (it requires a "jho1.ncrit09.Re%dk.pol" file), making it impossible to confirm if it actually works.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/convexengineering/gpfit/issues/84#issuecomment-422144337, or mute the thread https://github.com/notifications/unsubscribe-auth/ABagGAQnGa9Xo-XEQDiEmQD-IJYepvmFks5ub_sQgaJpZM4Wsj-_ .
Ali confirmed that the fits in gassolar (at least in tailpolars) don't have any data. I will check if the SPaircraft fits work.
One good news is that Martin's fits in the SPaircraft repo work...
Alright, I think we have figured out the issue. We didn't realize that you have to meshgrid in the number of dimensions of the independent variables. That is non-obvious from the documentation, but makes a lot of sense.
yupyup, that's one of the proposed new interfaces in the most recent gpkit issue on this
On Mon, Sep 17, 2018, 16:02 Berk Ozturk notifications@github.com wrote:
Alright, I think we have figured out the issue. We didn't realize that you have to meshgrid in the number of dimensions of the independent variables. That is non-obvious from the documentation, but makes a lot of sense.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/convexengineering/gpfit/issues/84#issuecomment-422150744, or mute the thread https://github.com/notifications/unsubscribe-auth/ABagGHFFCp3sY0YU0E8PmsfF-Kx2VmsFks5ub_-zgaJpZM4Wsj-_ .
Well, that was annoying but necessary. This underlines the need to merge gpfit into gpkit and document.
It seems to work for univariate fits, but not for multivariate ones. The code is here, under Code/frictionFactorFitting.py. When we run it, we get the following error:
Tried 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.