for example, i have a feature with 5 distinct values and once one hot encoded this becomes 5 columns, but lets say the data that needs to be predicted has 4 distinct values, the neural network won't accept the data as it is not in the right dimensions.
How do I go about solving this issue? would I use a label encoder instead of one hot encoding?
Thanks for your help.
I realised my mistake i one hot encoded a feature that is not categorical in nature. parch Number of Parents/Children Aboard --- which makes sense that the test data can contain less or more values in the feature leading to issues when one hot encoding.