Skip to content

Instantly share code, notes, and snippets.

@drewsday
drewsday / simulate_classification_retirements.py
Created July 25, 2018 19:47
My attempt to simulate the retirement of images from a Zooniverse project given a retirement limit (variable = limit) and the number of subjects (variable = subjects).
import numpy as np
sim_trial = []
num_sim_trials = 100
for i in range(num_sim_trials):
#initiate a dictionary of subject ids with counts all set to 0
subjects = 3500
subject_counts = {}
for i in range(subjects):
subject_counts[i] = 0
# The user will enter the population size and the number of generations in our GUI
popsize = int(self.ui.linePopsize.text())
numgen = int(self.ui.lineGenerations.text())
# initialize some arrays
allele = ['P' , 'Q']
i = 0
gen0 = []
listP = []
listQ = []