Hi Chris,
Do you want to send your current version of this plugin, or wait for some additional changes?
thanks,
Mark
Hi Mark,
Do you want to send your current version of this plugin, or wait for some additional changes?
Sorry, I’ve been mulling over the randomization stuff, as I’m not yet convinced that my proposed approach is the best option. Here’s what’s ready right now:
- Changes to make f_0 and sigma_f independent of stimulus size
- Simple randomization of noise frame order (random shuffle at the start of each pass through the image set), using the existing rand_seed parameter to seed the RNG
Should I share this version as is, or should I wait until I resolve the randomization stuff?
Chris
Sure, share this as-is and take your time with the rest.
Mark
OK, the latest version is in your GitHub repo. The compiled plugin is built against MWorks 0.9.
Chris
Hi Chris,
The current version we have in our git repo is from this date (May 21 2019) and it does not include a randomize= option.
Did you have a chance to add this?
(I’m happy with your proposed approach: randomize=‘sequential’, ‘random_with_replacement’, etc)
Talk to you in Jan,
Mark
Hi Mark,
No, I haven’t implemented the randomization option yet. I’ll try to get to it soon.
Cheers,
Chris
Hi Mark,
Regarding the randomization stuff, previously you said:
Actually, we have two main intentions: (1) we just need to KNOW the order of the noise frames for later analysis, and (2) sometimes we want the sequence to be re-randomized from one repeat to another.
As currently implemented, I believe the plugin satisfies both of these requirements:
- The stimulus description in
#stimDisplayUpdate
includes both the filename and the file hash of the current noise image, so you have a record of which image is used in any given frame. - The order in which the noise frames are used is already randomized, both when the stimulus first starts displaying and on every subsequent pass through the noise frames. The random number generator used to shuffle the images is seeded via the
rand_seed
parameter, so a previous sequence of noise frames can be repeated by specifying the same seed value.
Do you think you need additional control over the randomization beyond this? The scheme I outlined earlier (i.e. using a list of noise file names and a randomize
parameter) seems kind of awkward (or at least, non-MWorks-y in some hard-to-articulate way), and I’m reluctant to implement it unless you really need it. Maybe there’s a more palatable approach we can take, but I haven’t thought of one yet.
Thanks,
Chris
Hi Chris,
We don’t need any changes to the list of noise file names: just pointing it to a directory as we do now is fine.
However, it would be nice to have a ‘randomize’ parameter that did allow us to set 'random_without_replacement" and ‘random_with_replacement’. It’s not essential, but it would be nice. And while you’re doing that, ‘sequential_*’ settings would also be nice. Thoughts?
thanks,
Mark
Hi Mark,
However, it would be nice to have a ‘randomize’ parameter that did allow us to set 'random_without_replacement" and ‘random_with_replacement’. It’s not essential, but it would be nice. And while you’re doing that, ‘sequential_*’ settings would also be nice. Thoughts?
My thought is that this doesn’t seem very useful. I can see some value in an option that turns randomization on or off. For example, if you want to play a specific noise movie, and you name your noise files sequentially in the desired order, then you’d want to turn randomization off. But what happens when you’ve gone through all the noise images? Does the movie repeat? Do you randomize the next pass? Does the stimulus just stop?
As for randomization with/without replacement, when would the “with replacement” option be preferable?
I’m not saying we can’t add this. It just seems like it’d be increasing complexity without much benefit.
Chris
Comments below:
I can see some value in an option that turns randomization on or off. For example, if you want to play a specific noise movie, and you name your noise files sequentially in the desired order, then you’d want to turn randomization off. But what happens when you’ve gone through all the noise images? Does the movie repeat? Do you randomize the next pass? Does the stimulus just stop?
The movie repeats when you get to the end of the stimulus, yes.
As for randomization with/without replacement, when would the “with replacement” option be preferable?
For the kind of reverse-correlation experiments we have in mind, it’s probably better to do it with replacement, as then the next frame is always independent of the previous.
I think perhaps I wasn’t very clear about why we need this. We want to be able to do reverse correlation on the stimulus. Then, the statistical structure of the noise frame distribution can matter. Being able to generate a lot of frames and turn randomization off allows us precise control of the stimulus sequence. And randomizing without replacement ensures every frame is seen, which is sometimes helpful, but generally one cares more about statistical independence from one frame to the next.
None of this is really critical; we can do what we want w/ the current noise stimulus. (As e.g. with enough noise frames the two randomization options approach each other.) But for our application the randomize option makes a lot of sense to me.
thanks,
Mark
Hi Mark,
OK, you’ve convinced me. The only addition I’ll make is that, in the case of randomization with replacement, the stimulus should never use the same noise image twice in a row, as this will look like a stutter/frame skip. Agreed?
How about, instead of “randomize”, we call the parameter “noise_image_selection”, with “sequential”, “random_without_replacement”, and “random_with_replacement” being the accepted values? If that sounds OK, which value (if any) should be the default?
Thanks,
Chris
Hi Chris,
Great. I suggest random_with_replacemnt as default, but I’ll leave it up to
you, as it’s very easy for us to change.
As for avoiding the same noise image twice, I think that’s probably fine.
On the one hand, this alters the pure frame to frame independence
assumption. On the other hand, neurons are presumably driven more by
transient than unchanging stim (esp in rodent) and so two repeated frames
wouldn’t produce the same response anyway. And it’s basically the users’
responsibility to use enough noise frames so the former
isn’t a problem.
Thanks!
Mark
Hi Mark,
I pushed a new version of the plugin to your GitHub repo. It includes the “noise_image_selection” parameter with default value “random_with_replacement”. I didn’t include a compiled version, as I don’t know what version of MWorks you’re using.
Cheers,
Chris