Hi everybody, I have an issue with the exclude_ins...
# neural-forecast
s
Hi everybody, I have an issue with the exclude_insample_y flag. I want to train a model that predicts y, given past and future values of a vector X (excluding y). As a starting point I'm using this example. I created two additional columns called 'x1' and 'x2', that are both linearly related to y. Therefore it should be easy for the model to predict with those external variables:
Copy code
models = [NBEATS(h=h,input_size=7,
                loss=DistributionLoss(distribution='Poisson', level=[90]),
                max_steps=100,
                scaler_type='standard',
                hist_exog_list=['x1','x2'],
                exclude_insample_y = True)]
However, I cannot predict without feeding y:
p = model.predict(train[['ds','unique_id','x1','x2']])
Also, when I set y to zero, it gives a different result to when I don't. It seems like y is still used for prediction, although it should be excluded.
c
Hi @Silas Klug! You still need to pass the
y
because this is the target variable you are training to predict. Can you give us more information of your use case?
s
Hi Cristian, thanks for the quick response 🙂 I'm using y for training, but I want to leave it out during prediction. Ultimately, I want to predict (nowcast) a variable y based on some other variables X (and their past values). In the first step I want to be sure, y is really not used for prediction.
c
Got it, yes you are refering to the predict method. I will check what is happening, the values of
y
should not affect the outcome
s
Hi @Cristian (Nixtla), do you already have an idea what could be the issue?
c
@José Morales can you check this please?
👀 1
j
Hey @Silas Klug, this seems to be an issue with the scaling. If you remove the scaling you'll get the same predictions by passing y as zeros or the original values. I'll investigate it further