def create_future(fold, features_old, cfg_parameters):
"""
Just for testing purposes.
Sets up a replicate of the last day(s) data to create new data for testing. But in reality,
we should be able to create features for the upcoming days from past data, so this would not be needed???
"""
last_day = fold['window_end']
next_days = [last_day + timedelta(days=i) for i in xrange(1,(cfg_parameters['prediction_horizon'] +1 ))]
old_features_unique = features_old.drop_duplicates(subset='ToiletID')
l_future_features = []
for day in next_days:
next_day_features = old_features_unique.copy()
next_day_features["Collection_Date"] = day
l_future_features.append(next_day_features)
future_features = pd.concat(l_future_features, ignore_index=True)
return(future_features)
评论列表
文章目录