You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jseabold suggested a solution like this on the ML
# make some age variables 15-70
age = np.random.randint(15, 71, size=100)
# bin them into groups 15-24, 25-34, 35-70.
bin_idx = np.digitize(age, [25, 35, 71])
# make dummy variables
import scikits.statsmodels.api as sm
age_dummy, labels = sm.categorical(bin_idx, drop=True, dictnames=True)
No description provided.
The text was updated successfully, but these errors were encountered: