Hi everybody, I have an issue with the exclude_ins...
# neural-forecast
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]),
                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.
Hi @Silas Klug! You still need to pass the
because this is the target variable you are training to predict. Can you give us more information of your use case?
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.
Got it, yes you are refering to the predict method. I will check what is happening, the values of
should not affect the outcome
Hi @Cristian (Nixtla), do you already have an idea what could be the issue?
@José Morales can you check this please?
👀 1
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