def randomized_rounding()

in utils_data.py [0:0]


def randomized_rounding(D, feats_idx, key, oversample=1):

    return np.hstack(
        np.vstack(
            nn.one_hot(
                random.choice(
                    key, a=len(probs), shape=(oversample, 1), p=probs
                ).squeeze(),
                len(probs),
            )
            for probs in D[:, feat]
        )
        for feat in feats_idx
    )