Setting mean value for Poisson subsampling

49 Views Asked by At

I'm running a machine learning algorithm in federated settings where participants collaboratively build a model by participating in the training rounds.

At each training round, I need to sample a fixed number of participants, say 100 out of a total population of 500 to participate in the training.

The selection of participants should be based on poisson subsampling such that each participants is drawn with subsampling probability of 100/500.

I perform poisson subsampling with randomly selected lambda from the range [0,500], and keep subsampling with random lambda values until the 100 participants are drawn.

A small python snippet below

sampled_ids = []
participants_size = 100
population_size = 500


while len(sampled_ids) < participants_size:

  lambda_value = np.random.random_integers(low=0, high=population_size, size=1) 

  subsampling = np.random.poisson(lam=lambda_value, size=participants_size)

  for i in range(len(subsampling)):
           if len(sampled_ids) < participants_size:
                    sampled_ids.append(instance)

Is there any better strategy for setting the lambda other than random selection so the 100 participants are drawn with probability p = participants_size/population_size ?