jacobpennington / nems-lite

WIP refactor of lbhb/NEMS and lbhb/nems_db
GNU General Public License v3.0
1 stars 1 forks source link

Try implementing basis-function versions of parameterizations and output nonlinearities (low priority) #11

Open jacobpennington opened 2 years ago

jacobpennington commented 2 years ago

Started on this idea with some suggestions from Dr. Dimitrov, but didn't get very far. In short, the current approach to wc.g and similar parameterizations, and output nonlinearities like dexp, necessitates nonlinear optimization. However, if we can re-formulate these in terms of linear combinations of basis functions then optimization can remain linear (not counting models that include STP - not sure if that one would be linearizable). We would also need a basis-function representation of the full-rank STRF (instead of the factorized approach). This would guarantee a unique optimum and make optimization easier.

It's not clear if this would make much difference in the end, so this isn't a high priority. But even if performance stayed the same, we could say with confidence that we found the best fit (instead of hand-waving all the issues with nonlinear optimization), at least for LN models. Another issue to consider with this is whether a different optimization routine should be called (i.e. is the general scipy.minimize able to recognize when an objective is linear?)