I have an experiment in JS in which I have the following setup. 4 classes of images,…
- User
I have an experiment in JS in which I have the following setup. 4 classes of images, that can be influenced by 3 distortions each of 3 levels. The reference images are named 1 to 1028 (each 256 have their own class). How can I make JS code that calls a certain number of images (about 450) for each observer. The observer should see all classes, types and levels as evenly as possible and the reference images should not repeat.
- Assistant
You can achieve this by creating a function to generate a list of images with the required conditions, then shuffling that list and selecting the number of images you want each observer to see. Here's a code snippet to help you achieve that:
javascript