Real world return minimum value

47 Views Asked by At

I work in research, and we need to write a script to ensure that the experimental conditions are all implemented the same number of times, but users enroll in the conditions at different times. The algorithm to select the condition shown was randomized for the first round of experiments, so we have some conditions that were tested 20 times, and others that were tested 0 times.

I was thinking I could implement .min() and have an array of arrays, and the index of the first array would represent the frequency. Like: [[condition1, condition2], [], condition5, [condition3, condition 4]]

So condition1 and 2 have been implemented 0 times, no conditions have been implemented once, condition5 was implemented twice, and so on.

But, if we have hundreds of conditions, I'm not sure how realistic for time and space usage this would be in the real world. Is there a better solution?

0

There are 0 best solutions below