Hi there, is there anyway to do lead and lag on th...
# mlforecast
s
Hi there, is there anyway to do lead and lag on the features?
j
how would you predict using lead?
s
let's say I have a feature A that is available across training and test. I simply want to shift it forward by interval because there's a lag in target reaction. but I was just asking this generally - to take a lag or lead on the feature...
j
only lags are supported
s
what's the method?
j
what do you mean by method?
s
I mean the function to take the lag on the feature. I can see there's lag_transforms which is functioning on the target.
j
it's an internal function that takes a lag of all series, there's nothing special about it and it won't work with negative numbers if that's what you want to do
s
right I'm not trying to do that. the only reason I want that functionality is that I don't have to deal with the nans in the df. for example if I do df.shift I will get nans which I will further need to drop to train the model. I can see when I take lag on target by using
lag_transforms
or
lags
, they are filled by some values which I would assume it got handled.
j
they're not filled, they're dropped by default (
dropna=True
)