3

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):

radar off scale

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]

radar normalized

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.

centered

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?

koko
  • 958
  • 12
  • 26

2 Answers2

12

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:

org-vs-outlier

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 that x_new in [0,1]

  • z-standarization:

    x_new = (x-mean)/std, where x_new ~ N(0,1)

  • softmax normalization with logistic sigmoid:

    x_new = 1/(1+exp(-(x-mean)/std)), and x_new in [0,1]

  • energy normalization:

    x_new = x / ||x||, such that x_new in [0,1] (make each point a unit vector)

minmax-standarize-softmax-energy

Community
  • 1
  • 1
Amro
  • 123,847
  • 25
  • 243
  • 454
2

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.

daroczig
  • 28,004
  • 7
  • 90
  • 124
  • this is technically the best solution, but I don't think a 'normal' user would understand why the distance between the circles is getting smaller. moreover, the center point of a polygon might be optically distorted. – koko Feb 03 '11 at 11:43
  • 1
    @koko: that is true, understanding a log scale can be tricky. Give a link to Tufte's Log-animal image (http://www.christopher-robbins.com/wordpress/2010/04/02/edward-tufte-log-animals/), and visitors will get the picture :) Anyway, I think other transformations cannot be understood a lot easier than logarithm. – daroczig Feb 03 '11 at 11:53
  • @daroczig: thanks so far, i guess you're right... maybe i'll get another answer, so i'll wait a little while before accepting yours. – koko Feb 03 '11 at 12:46
  • @koko: of course, there is no rush! I hope also that a more popular solution could be given. – daroczig Feb 03 '11 at 13:39
  • While I agree that normal users will have difficulty understanding a log scale, I think it's also worth pointing out that normal users are going to have a **really** hard time understanding a radar plot. koko, could you expand on the context of the plot? That might help us make better suggestions. – Matt Parker Feb 03 '11 at 18:15
  • solved it by using a logaritmic scale... to be honest, i can't really figure how to adapt Amro's aproach :D – koko Feb 07 '11 at 10:04