From 12cbb21077bd6de997bf91974d6ea95e8d318083 Mon Sep 17 00:00:00 2001 From: Dev Singh Date: Fri, 6 Mar 2020 12:43:01 -0600 Subject: [PATCH] super ultra working --- .../__pycache__/analysis.cpython-37.pyc | Bin 26717 -> 26640 bytes data analysis/analysis/analysis.py | 27 ++++++------------ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/data analysis/analysis/__pycache__/analysis.cpython-37.pyc b/data analysis/analysis/__pycache__/analysis.cpython-37.pyc index ab9a7c01e220b38919996687c9d3e81ba2f539cd..9cd8c993cb9cf52831a77cadf81e97fcd49a7364 100644 GIT binary patch delta 1415 zcmbVLYitx%6u#f>Zo6-x4`BI0Op8qm^Z}I8+6vMZ8*EEo(#O(W>2~_qEp1^tt+dX# z!BP?+hSkHPzHm3zAk>)P7){f({veVVtCqwEDME~apovjKOhcMjy|dMb^^ZEqz32PR z$-Upqch20HL1+e!BD>wf#Itt9>yf)JIdap2c0u)Au~@z5IAbykLtzo9iwFVyvFhc@_<` z7@%h}-iDnvW~PuUvpmZiz03j&cfbJyH*wBQhD5%aFXQn`n1yq?k(oh`tZ95e*R#IF zNAyniMSMu^jjyAeu;~eWLUo(w@HJIz4&fWRx%n(^k#)-&I+fFp?*!V1S=zs45Kpy-+<6ArUJSZiviT?&VoYw>c-OO{tOojO#IOt`uCusBe4*^y5 zV8KzW(#{t+fMo5xLZ_aad1M&rRJZM0f%CVYMh<vYkEHOA|ZqL~%MzKUNBf5=%!>s*RWa z1RSIbyWHr};vNqHPti!(N%U!HxTt zQ|I0bxT+;J$-q~1+)cPfYdoc>q&810zR;#U1sr$C)O=B-wB|Ctz+dp{c+6V^BQ1E} f64Nx+GKzSrlDe>hrlfJauN`WAm%~dL9ofGFKog(9 delta 1539 zcmbVMYfM~46rOMP!S2E?TZ*Ntrq!a2NI__6d94Z)wh z1hL`Y6EE@xneUDTVsUKJ4XBNa)MHCf$NgvO7;{joSx_Ik0ktVc&Ha+hI-m(6W=#f5 zz#>C3JJ<-6_`Oqsc*!EikML5~_>7VeNa(b7+T;W&{z)iS;U$LcvSycslOim_6{~Cw zFAoG+I9bzAsFy4Y^%fGHH%SQ&rj5=Onof#M<} zFkxf+WQ(>>lQ@L_88?gRZ_#|os+AQCasS07T59`$Esb@Q`#)d0qq44=r6szex^6H1 zeD_r-G?)G;LL{vV7o38)2jUtq#?w~%*9co@@DBKzeg0H|qlST2Z{JYV)Y}*E_IQWe z>ddWs{DW-|w|fKR%y<=vbS)#*7)4DKL*&SOAlDZ=$__j9+{8Jzz`{-XWPUTZ^CWKh zTO{ev2#sfE=)_u@$@~CkY3!a^d`xXwCvcAJ*~hViPG&!dSu(G`hAT%lgzzOD-Y|i$ z>8+eqdxKGb)05%8>}W#@j}%) ze>z>x&8EJ*+hC=`d5uV-`8*F&$d&KGt?DcJcLFZ@q~HKx^m~DSEA53uzWcAna2f@-InhIBwoPHD+U=YNhN)qDBlfDNwugX6sI2TM>{CB0 z%K;uIdwCNMP=EOqjFH>58;5Ad^&ZCQU_~8{&|Jki9Hr@e>1LaES^V376@kMkmV2 z;c3G~HR##Q@eRG%bV7vMo6C5dj?`w&@w8OIM$;`XV+DCyr*I4Dq#mrMe(4R&sOfDd KIlAalN7nE7Ah=!t diff --git a/data analysis/analysis/analysis.py b/data analysis/analysis/analysis.py index 4d077276..01262f96 100644 --- a/data analysis/analysis/analysis.py +++ b/data analysis/analysis/analysis.py @@ -348,17 +348,17 @@ def histo_analysis(hist_data): def regression(inputs, outputs, args): # inputs, outputs expects N-D array - inputs = inputs[~np.isnan(inputs)] - outputs = outputs[~np.isnan(outputs)] + inputs = np.array(inputs) + outputs = np.array(outputs) + + inputs = inputs[np.isfinite(inputs)] + outputs = outputs[np.isfinite(outputs)] regressions = [] if 'lin' in args: # formula: ax + b try: - X = np.array(inputs) - y = np.array(outputs) - def func(x, a, b): return a * x + b @@ -375,9 +375,6 @@ def regression(inputs, outputs, args): # inputs, outputs expects N-D array try: - X = np.array(inputs) - y = np.array(outputs) - def func(x, a, b, c, d): return a * np.log(b*(x + c)) + d @@ -392,10 +389,7 @@ def regression(inputs, outputs, args): # inputs, outputs expects N-D array if 'exp' in args: # formula: a e ^ (b(x + c)) + d - try: - - X = np.array(inputs) - y = np.array(outputs) + try: def func(x, a, b, c, d): @@ -411,8 +405,8 @@ def regression(inputs, outputs, args): # inputs, outputs expects N-D array if 'ply' in args: # formula: a + bx^1 + cx^2 + dx^3 + ... - inputs = [inputs] - outputs = [outputs] + inputs = np.array([inputs]) + outputs = np.array([outputs]) plys = [] limit = len(outputs[0]) @@ -434,10 +428,7 @@ def regression(inputs, outputs, args): # inputs, outputs expects N-D array if 'sig' in args: # formula: a tanh (b(x + c)) + d - try: - - X = np.array(inputs) - y = np.array(outputs) + try: def func(x, a, b, c, d):