Analytics, Data Science, Statistics, Glm, Poisson Regression.
import statsmodels.api as sm import statsmodels.formula.api as smf def stepwise_selection(data, response, initial_candidates, alpha_enter=0.05, alpha_remove=0.1): remaining_candidates = set(initial_candidates) selected_candidates = [] current_score, best_new_score = float('inf'), float('inf') while