How do I know when to apply LabelEncoder() or OneHotEncoder()?
I have used LabelEncoder to encode categorical variable for RandomForestRegressor model and it gives a extremely high mean squared error. I have tried hyperparameter tuning with GridSearchCV and it still gives the same value
According to the documentation, you should avoid using LabelEncoder for this:
(Source.)
Therefore, I'd suggest using OneHotEncoder instead.