Relative Content

Tag Archive for machine-learningneural-networkgoogle-colaboratoryone-hot-encodingdata-preprocessing

One-hot-encoding categories not seen by the validation set

I’m training a RNN on the IDS-2018 dataset.
I wrote a pipeline for data preprocessing and applied it to the training set, during which I used one hot encoding using fit_transform. However, when I apply the same preprocessing to the validation set (using transform instead of fit_transform), I get an error saying there are new categories not found during the fitting phase (but these categories were already found).
How can I fix it?