I learnt (from below links) that to effectively do target encoding without overfitting, we have to do cross validation for each fold (so kind of double validation) and compute the encoding values of categories based on the mean values of the remaining folds.
- IS this double cross validation already included in the 'TargetEncoder' class in categorical_encoders library ?
- If I use the targetencoder directly in a pipeline without any extra cross validation, will it be valid (like the double cross validation) or will it lead to overfitting?
From the below implementation on github of the class, I don't see any CV being done in fit and transform. https://github.com/scikit-learn-contrib/category_encoders/blob/master/category_encoders/target_encoder.py