-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the Cartesian Product to generate IV within a block #27
Comments
Hi, I think I would normally do nested for loops to achieve this. Detailed here: https://github.com/immersivecognition/unity-experiment-framework/wiki/Factorial-design Does that answer your issue, or are you suggesting this process be automated? I know the above solution requires a few lines of code compared to a built-in solution, but I would generally prefer having trials be explicitly created rather than by some magic in the background based on names of settings variables. |
Yes, it is a suggestion for some automation. This is such a critical component of experimental design that other labs have developed tools that have focused more specifically on this issue. Have a look here: https://www.biomotionlab.ca/tux/. The nice thing about their implementation is that it provides a table breakdown of the design the experimenter can visually inspect for issues. |
It might not be well documented but UXF has a similar feature, but perhaps not as obvious. after you start the session, you can launch the UXF Session Debugger. I added details here: |
I think I'll have a go at this just by making a sample Experiment Generator script with an inspector that allows creating factors and their levels. Hopefully users would use this to see its quite easy and more flexible to write your own. |
Still on my radar- maybe one day I will be able to do this. |
Have you considered using the Cartesian Product to build blocks?
Here's an example json of an experiment with a practice block and a single main block.
If you were to specify a blocklist in your json, it could be used as a prefix (e.g. block1_) to then grab a list of experimental variables per block (eg. suffixes independentVarA, and independentVarB). This list could then be used to create the cartesian product of all independent variables (the factorial of List block1_independentVarA and List block1_independentVarB );
I'm not quite sure how to work in repetitions in a manner that provides flexibility to have unequal trial frequencies. Perhaps as another independent variable, e.g. "block1_repetitions": [ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,10], which would have 5 reps of all trials except for the final permutation (block1_independentVarA = 1.5, block1_independentVarB = 0.8);
There is also the issue of typing, and I see that session.settings.getType() has not yet been implemented.
I did take a crack at this myself, but I'm no c# guru, and decided to pass on the challenge once I realized the complexity.
The text was updated successfully, but these errors were encountered: