how to normalize statistics for a radar chart
I'm using raphaelJS to draw a "radar chart" to display statistical data. For each axis it should accept values between 0 and 10.
For example, the vales of a polygon with its center point right in the center of the chart [10,10,10,10,10]. Simple...
However, it might happen that data looks like this:
[26, 14, 48, 18, 1],
[ 3, 14, 8, 9, 5],
[10, 6, 4, 16, 3]
which leads to this (displaying the polygon with its center point in the bottom left off the chart):
If I would normalize data based on its biggest value (in this case 48), all of the other center points would be too near to the center the chart, and and its informative value would be around 0.
same data normalized based on its biggest value:
[5.42, 2.92, 10, 3.75, 0.21],
[0.63, 2.92, 1.67, 1.88, 1.04],
[2.08, 1.25, 0.83, 3.34, 0.63]
开发者_Go百科So now all of the other center points are clustered in the center of the chart, and have lost all of their explanatory power... If there was more than 3 center points, they would most likely overlap each other.
I was thinking about a relative way to display each polygon, without losing too much relation between each polygon, if it's possible...
Any ideas how to do this, or maybe another approach how to normalize?
As suggested by @daroczig, log-transformation of the data is the way to go. I just wanted to add that there are many types of transformation you can perform.
Perhaps an example might help in this. I will be using the Parallel Coordinates visualization to illustrate the example, but the same concepts should apply for Radar Chart. All experiments are performed in MATLAB.
Consider the Fisher Iris dataset, it contains 150 instances where each point has 4 dimensions. If we add an outlier point outside the range of normal values, we get:
As expected, the plot gets scaled to accommodate the new point, but as a result we loose the detailed view we had before.
The answer is to normalize the data by applying some kind of transformation. The following shows a comparison of four different transformations:
Min/Max normalization:
x_new = (x-min)/(max-min)
, so thatx_new in [0,1]
z-standarization:
x_new = (x-mean)/std
, wherex_new ~ N(0,1)
softmax normalization with logistic sigmoid:
x_new = 1/(1+exp(-(x-mean)/std))
, andx_new in [0,1]
energy normalization:
x_new = x / ||x||
, such thatx_new in [0,1]
(make each point a unit vector)
Transforming your data to logaritmic scale is not an option?
That way a few extreme value would not distort/crowd the other values. Just compute the common/natural logarithm of the values of your array (e.g. see w3school page on it), and feed those to the chart API.
精彩评论