I have a skewed distribution that looks like this:
How can I transform it to a Gaussian distribution? The values represent ranks, so modifying the values does not cause information loss as long as the order of values remains the same. I'm doing this to experiment if different distributions change the behavior of my ML models.
I'm working with Python/NumPy/Pandas/scikit-learn.
Edit: I should clarify that I have a lot of features and I'm looking to automatically transform all feature distributions. I was able to find a reasonable transformation for a single feature with a lot of experimentation, but it doesn't generalize to other features:
normalize(np.log(0.30 + original))
.
** here would be image i.stack.imgur.com/uzorK.jpg
but I don't have enough rep to post more than 2 images **
normalize(np.log(0.17 + another_feature_distribution))
.
In this image the purple bars represent the original distribution of another feature, green bars represent the transformed distribution. No matter how much I tweak the constant, I don't get the high green bar on the left extreme to disappear. Also, I don't have time to manually find a formula for each feature. Not sure if these are bell-shaped enough anyway?