gpt4 book ai didi

java - "biased"直方图中的 "Metrics"是什么意思

转载 作者:搜寻专家 更新时间:2023-10-31 19:56:17 27 4
gpt4 key购买 nike

Codahale 的“指标”收到的其中一个属性是“有偏见的”。
谁能解释一下这是什么意思?

public Histogram newHistogram(Class<?> klass,
String name,
boolean biased)
Creates a new Histogram and registers it under the given class and name.
Parameters:
klass - the class which owns the metric
name - the name of the metric
biased - whether or not the histogram should be biased
Returns:
a new Histogram

最佳答案

如有疑问,请查看源代码:

    /**
* Uses an exponentially decaying sample of 1028 elements, which offers a 99.9% confidence
* level with a 5% margin of error assuming a normal distribution, and an alpha factor of
* 0.015, which heavily biases the sample to the past 5 minutes of measurements.
*/
BIASED {
@Override
public Sample newSample() {
return new ExponentiallyDecayingSample(DEFAULT_SAMPLE_SIZE, DEFAULT_ALPHA);
}
};

有偏差的直方图会为最近的测量值赋予更多权重。

关于java - "biased"直方图中的 "Metrics"是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16213776/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com