forked from TrueCloudLab/frostfs-sdk-go
[#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:
parent
670619d242
commit
20d325e307
2 changed files with 5 additions and 9 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue