Created
September 27, 2018 08:59
-
-
Save CaptainAshis/4db4373d89dd5272a42449b12384e630 to your computer and use it in GitHub Desktop.
dt_feature82 ros fastai
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 13 | |
for v in cat_vars: joined[v] = joined[v].astype('category').cat.as_ordered() | |
for v in contin_vars: | |
joined[v] = joined[v].fillna(0).astype('float32') | |
joined_test[v] = joined_test[v].fillna(0).astype('float32') | |
dep = 'Sales' | |
joined = joined[cat_vars+contin_vars+[dep, 'Date']].copy() | |
# We're going to run on a sample. | |
idxs = get_cv_idxs(n, val_pct=150000/n) | |
joined_samp = joined.iloc[idxs].set_index("Date") | |
samp_size = len(joined_samp); samp_size | |
# 150000 | |
# To run on the full dataset, use this instead: | |
samp_size = n | |
joined_samp = joined.set_index("Date") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment