0
$\begingroup$

I'm trying to cap outliers in a column of my pandas DataFrame. Here's the boxplot for a column of my original data. boxplot for a column of my original data So, using code from this stackoverflow answer, I tried capping outliers.

Here's how capped column looks like, with new outliers after upper bound. only with outliers at upper bound capped

My problem now is, I can't keep capping outliers, yes! What do I do now?

$\endgroup$
2
$\begingroup$

Once is all it takes; you're done. The point of dealing with outliers is that they are rare. Forcing your model to fit to those outliers can make its performance against inliers (which it will encounter far more often) worse, and that's A Bad Thing. Although you now have values that look like outliers when you plot them, this is an artifact of your earlier transformation - those values should be within the "normal" expected range of values for your data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.