Outlier detection is part of data preprocessing and used to remove some of the rare events but it could happen that rare events are important to us like fraud detection in that case it becomes important and so we can't do outlier detection beforehand.

In that case we do various approaches like undersampling of majority events or oversampling of minority class. For various approaches refer this

You could also look into KPCA. Having said that there is no particular solution it all depends upon your dataset.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.