I know that the predictive horizon is the time window that runs from the observation of the data to the manifestation of the target variable.
But how can I deal with prediction if the time horizon varies in my dataset? I mean, how can I manage the prediction when the target variable is observed at a (known) variable time horizon with respect to the data?
Is it possible to train a simple logistic reression with the aim of having a 1 year prediction starting from a training dataset where the predictive horizon is varying (but known).
Here you have an example:
- target is the target variable to be predicted
- X1, X2 are the features
- time is the time (in months) elapsed between the observation of the features and the target variable (i.e. the time horizon)
My aim is to use this dataset (below is just an example) to predict the target variable over a predictive horizon of 1 month
target | X1 | X2 | time |
---|---|---|---|
0 | 0,42 | 0,23 | 3 |
0 | 0,43 | 0,14 | 4 |
0 | 0,27 | 0,16 | 6 |
1 | 0,05 | 1,41 | 2 |
1 | 0,59 | 1,10 | 3 |
0 | 0,31 | 0,47 | 5 |
0 | 0,14 | 0,32 | 3 |
1 | 0,71 | 0,68 | 4 |
Thank you