In Lesson 5, under the topic of extratpolation(video starting:49:23), the professor states the following:
So in this case, what I wanted to do was to first of all figure out what’s the difference between our validation set and our training set. If I understand the difference between our validation set and our training set, then that tells me what are the predictors which have a strong temporal component and therefore they may be irrelevant by the time I get to the future time period. So I do something really interesting which is I create a random forest where my dependent variable is “is it in the validation set” (is_valid). I’ve gone back and I’ve got my whole data frame with the training and validation all together and I’ve created a new column called is_valid which I’ve set to one and then for all of the stuff in the training set, I set it to zero. So I’ve got a new column which is just is this in the validation set or not and then I’m going to use that as my dependent variable and build a random forest. This is a random forest not to predict price but predict is this in the validation set or not. So if your variable were not time dependent, then it shouldn’t be possible to figure out if something is in the validation set or not.
Now i am really confused about this.
How does having the column is_valid help us in understanding if there are any time dependent predictors?
Because thinking about this deeply, in the training set, the value of is_valid is all 0. So the RF algorithm only sees a pattern of 0 for all observations. So its understood that the RF algorithm has no way of predicting is_valid in the validation set since it hasn’t really seen a value of 1 for is_valid in any of the rows during its training.