code: def generate_evenly_distributed_data(dim = 2000,
                                       num_active = 40,
                                       num_samples = 1000,
                                       num_negatives = 500):
    
  
    sparse_data = [numpy.random.choice(dim, size = num_active, replace = False)
        for i in range(num_samples)]
    data = [[0 for i in range(dim)] for i in range(num_samples)]
    for datapoint, sparse_datapoint in zip(data, sparse_data):
      for i in sparse_datapoint:
        datapoint[i] = 1
  
    negatives = data[:num_negatives]
    positives = data[num_negatives:]
    return positives, negatives
docs: Generates a set of data drawn from a uniform distribution.  The binning
    structure from Poirazi & Mel is ignored, and all (dim choose num_active)
    arrangements are possible. num_negatives samples are put into a separate
    negatives category for output compatibility with generate_data, but are
    otherwise identical.