Closed jacobpennington closed 6 years ago
@jacobpennington There were a couple small problems, having to do with pointers and indexing. xforms and modelspec appear to be doing the right thing. One issue is using the right indexing in the print("xxxx".format()) command. Second is when you evaluate a modelspec, pointers get preserved, so that "befores"'s prediction is overwritten with "afters"'s. I kludged a fix for the dexp problem.
Wow, can't believe I missed that format indexing. I guess that's what I get for operating a keyboard while sleep-deprived. Other fix makes sense, had to go read the docs on copy vs deepcopy again after reading your comment. Thanks for fixing these, hope it wasn't a huge headache.
I noticed when using nems_db/scripts/test_quickplot.py that the correlation coefficient stored in the modelspec meta (displayed in the last plot in the figure) was identical for est and val (at least out to 3 digits) for several different cells tried, which seemed unlikely. The code for calculating the coefficient doesn't appear to have any issues, so I'm guessing xforms (or the baphy xforms wrapper) is either assigning the same value to each entry or the est and val recordings are pointing to the same data or something along those lines. Just noticed this as I was wrapping up for the day so I didn't have time to look into it further.
Probably related, when setting up the plot for dexp (which is supposed to calculate the correlation before and after that step in the model), the same issue occurred: both correlations are identical (and identical to the final correlation stored in the modelspec), even though the pred signal obviously changes quite drastically between the before-dexp and after-dexp steps.
So... I guess i'm looking for some help on this one. First issue is most likely more general, plot issue may very well be something I didn't set up correctly in the quickplot code.