in datasets/adult.py [0:0]
def randomKway(self, num_kways=24, k=3, seed=0):
"""
return num_kways k-way tuples from data features
"""
prng = np.random.RandomState(seed)
total = self.df.shape[0]
# generate k-ways with support smaller than the actual population
proj = [
p
for p in itertools.combinations(self.df.columns, k)
if self._get_size_domain(p) <= total
]
# randomly select subset from k-ways of size num_kways
if len(proj) > num_kways:
proj = [proj[i] for i in prng.choice(len(proj), num_kways, replace=False)]
return proj