Analytics, Data Science, Statistics, Glm, Poisson Regression.
results.aic scores_with_candidates.append((score, candidate)) scores_with_candidates.sort(reverse=True) best_new_score, best_candidate = scores_with_candidates.pop() if current_score > best_new_score: remaining_candidates.remove(best_candidate) selected_candidates.append(best_candidate)