Have a dictionary and the values of the dictionary are arrays.
d = {"one": a1, "two": a2, "three": a3}
a1 = np.array([1,2,3])
a2 = np.array([2,5,6,7])
a3 = np.array([1,2,8,3,4])
Need to do some statistics test later( haven't decide which test to use yet, use ttest as one example) for each combinations of the arrays without worry about orders. For example do t-test for following combinations,like:
ttest(a1,a2)
ttest(a2,a3)
ttest(a1,a2,a3)
How could I quickly generate these combinations.
There is
from itertools import combinations
list(map(dict, itertools.combinations(d.items(), 2)))
which could create fixed length combinations like 2 of each combinations, how about 3 pairs.
Expected results
{'test1': test_result1,'test2': test_result2,'test3': test_result3}
Currently need to figure how to quickly generate those combinations.