Last active
September 25, 2018 06:01
-
-
Save CaptainAshis/11960e7423d1494e79294f234e55cb16 to your computer and use it in GitHub Desktop.
ros_dt_feature2 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 6 | |
# The following extracts particular date fields from a complete datetime for the purpose of constructing categoricals. | |
# You should *always* consider this feature extraction step when working with date-time. | |
# Without expanding your date-time into these additional fields, you can't capture any trend/cyclical behavior as a function of | |
# time at any of these granularities. | |
# We'll add to every table with a date field. | |
add_datepart(weather, "Date", drop=False) | |
add_datepart(googletrend, "Date", drop=False) | |
add_datepart(train, "Date", drop=False) | |
add_datepart(test, "Date", drop=False) | |
# Note - drop: If true then the original date column will be removed. If false it will not be dropped. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment