Question



How to select number of dates in test set

Dr. Ballings,

For the stock project, when i lead my dependent variable it leaves NA's for all the symbols on date 12/31 (which is what i want). I know in
class you said to include the last two days in our test set (12/28 and 12/31). However, for KNN you cannot include NA's. So when i omit all
the NA's it gets rid of all 12/31 data leaving only 12/28 data in the test set. Because of this problem, should i include 12/27, 12,28 and
12/31 data? That way when I omit all NA's, I will still have two dates in the test set (12/27 and 12/28)?

Thanks,
Landon





Answers and follow-up questions





Answer or follow-up question 1

Dear Landon,

To be clear: you do not need two days in your test set.

What you do need is to have at least one day for which you have a ytest.

Please note that the test set is different from the new data.
The test set is what you would use to evaluate your model.
The new data is the last day for which you do not have a y. The website has the y.

Michel Ballings



Sign in to be able to add an answer or mark this question as resolved.