[#167] netmap: Fix reverse min agregator

The higher the price, the lower reverse min weight should be.
Previously nodes with 0 price had 0 weight which is a bit misleading.

Introduced in d71a0e0755.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-10-26 14:03:50 +03:00 committed by Evgenii Stratonikov
parent 670619d242
commit 20d325e307
2 changed files with 5 additions and 9 deletions

View file

@ -156,11 +156,7 @@ func (a *meanIQRAgg) Compute() float64 {
}
func (r *reverseMinNorm) Normalize(w float64) float64 {
if w == 0 {
return 0
}
return r.min / w
return (r.min + 1) / (w + 1)
}
func (r *sigmoidNorm) Normalize(w float64) float64 {