Normalize data from different groups

I have data that has been grouped into 27 groups by different criteria. The reason for these groupings is to show that each group has different behavior. However, I would like to normalize everything to the same scale. For example, I would like to normalize to a 0-1 scale of 0-100, that way I could say something like $43^{rd}$ percentile and it would have the same meaning across groups. If I were to just, say, standardize each individually by subtracting the mean of each and dividing by standard deviation, would this work? Would I have to calculate the mean/standard deviation of all of the combined data or do each of the 27 groups individually?

Topic groupby normalization pandas python

Category Data Science


You can normalize each criteria independently in values between 0 and 1 without taking into account the other criterias, it will work better for most classification methods k-nearest neighbors, random forest, neural network, etc.

$$x^*_{i,j}=\frac{x_{i,j}-x^{min}_j}{x^{max}_j-x^{min}_j}$$

About

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