Last active
September 27, 2018 10:44
-
-
Save CaptainAshis/952ed5e2823eee36871407d688d4414a to your computer and use it in GitHub Desktop.
dt_feature92 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
# Approach 1 | |
# One approach is to take the last 25% of rows (sorted by date) as our validation set. | |
train_ratio = 0.75 | |
# train_ratio = 0.9 | |
train_size = int(samp_size * train_ratio); train_size | |
val_idx = list(range(train_size, len(df))) | |
# Approach 2:- Just the last 2 weeks of data | |
val_idx = np.flatnonzero( | |
(df.index<=datetime.datetime(2014,9,17)) & (df.index>=datetime.datetime(2014,8,1))) | |
val_idx=[0] | |
# We will go with Approach 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment