Closed qsimeon closed 1 year ago
Hi Quilee, thank you for your interest in the package :)
Decodanda is currently designed to handle binary variables only. I am working on an expansion to multi-class, but in the meantime, you can "binarize" stimulus by dividing stimuli into two groups of two, or by only using two stimuli at a time. For example
conditions = { 'stimulus': { 'A': lambda d: d['stimulus'] < 2, 'B': lambda d: d['stimulus'] >= 2, } }
to group the stimuli into two groups, or conditions = {'stimulus':[1, 2]}
for using only two at a time
@lposani
Great package! Thank you for making it.
Has this feature been added yet?
Hi @JensBlack, I have not added this feature yet, but given that several people seem to ask for it, I will speed up the development!
First off, really great package! I am honored to be the first to post an issue. I was wondering whether the Decodanda class only works with binary task variables? For example in the Bernardi et al. 2020 paper, there stimulus variable could take four values 'A', 'B', 'C' and 'D' corresponding to the four distinct fractal images the monkeys were trained on. I've trained a neural network model and collected the activations of some layer (16 units = 16 "neurons") and eventually I want to get to doing the CCGP. Here's my code omitting all the model and dataset stuff.
This outputs """ {'stimulus': [0, 1, 2, 3]} {'stimulus': 1.0} {'stimulus': array([0.49646302, 0.49308682, 0.5153537 , 0.525 , 0.49533762, 0.53553055, 0.50393891, 0.5068328 , 0.48561093, 0.51109325, 0.49847267, 0.50217042, 0.51655949, 0.49742765, 0.49766881, 0.51197749, 0.52974277, 0.49019293, 0.49533762, 0.50562701])} """
But I can't trust that this is correct since I don't think that decondanda is designed to work with variables that are not binary (in this case stimulus is quaternary). So my question (not really "issue") is am I correct in thinking that?