What is the difference between d3.scale.quantize() and d3.scale.quantile()?

前端 未结 4 1907
北恋
北恋 2020-12-14 09:12

From the docs, the definitions are:

quantize

..a variant of linear scales with a discrete rather than continuous range. The input domain is sti

4条回答
  •  执笔经年
    2020-12-14 09:25

    The difference is, as far as I can tell, simply that statistically quantiles are finite, equal, and evenly-distributed discrete blocks/buckets into which your results simply fall. The difference being that a quantized scale is a continuous function based on your discrete input.

    Basically: quantize allows interpolation and extrapolation, where as quantile forces the value into the subset.

    So, for example, if a student's calculated grade is 81.7% in a quantized scale, a quantiles scale of percentiles would simply say that it is of the 81st percentile. There's no room for flexibility there.

提交回复
热议问题