如何归一化雷达图的统计数据 [英] how to normalize statistics for a radar chart

查看:97
本文介绍了如何归一化雷达图的统计数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 raphaelJS 绘制雷达图"来显示统计数据.对于每个轴,它应该接受 0 到 10 之间的值.

I'm using raphaelJS to draw a "radar chart" to display statistical data. For each axis it should accept values between 0 and 10.

例如,中心点位于图表中心的多边形的值 [10,10,10,10,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):

如果我根据其最大值(在本例中为 48)对数据进行标准化,则所有其他中心点都将离图表中心太近,其信息值将在 0 左右.

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]

所以现在所有其他中心点都聚集在图表的中心,并且失去了所有的解释力……如果中心点超过 3 个,它们很可能会相互重叠.

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?

推荐答案

将您的数据转换为对数标度 不是一个选项?

Transforming your data to logaritmic scale is not an option?

这样一些极值就不会扭曲/挤占其他值.只需计算数组值的常用/自然对数(例如,请参见 w3school 页面),并将它们提供给图表 API.

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.

这篇关于如何归一化雷达图的统计数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆