aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2022-09-30 14:24:53 +0200
committerTibor Frank <tifrank@cisco.com>2022-10-03 05:12:33 +0000
commitea654523b71d2bafc941f8b95d06909324e3c902 (patch)
tree3209d89de3d9b5ca0b8cf170def7fc635c49de4d
parentd5e75e153fe6d0abb6f3bbf0911de09957ea0d8c (diff)
fix(soak): scale also rarity
Without this, far-off samples are considered too important leading to wrong integration. This should fix the symptom of secondary stats being too different. Change-Id: I66496ac25da95eae1f83154f32eb56f941cb20ce Signed-off-by: Vratko Polak <vrpolak@cisco.com> (cherry picked from commit d772d5346cf1c4802bda63e4faf008222b6c0cf0)
-rw-r--r--resources/libraries/python/PLRsearch/Integrator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/libraries/python/PLRsearch/Integrator.py b/resources/libraries/python/PLRsearch/Integrator.py
index a7a59391ed..7f118db00d 100644
--- a/resources/libraries/python/PLRsearch/Integrator.py
+++ b/resources/libraries/python/PLRsearch/Integrator.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -253,7 +253,7 @@ def estimate_nd(communication_pipe, scale_coeff=8.0, trace_enabled=False):
)
# The code above looked at weight (not importance).
# The code below looks at importance (not weight).
- log_rarity = param_distance / 2.0
+ log_rarity = param_distance / 2.0 / scale_coeff
trace(u"log_rarity", log_rarity)
log_importance = log_weight + log_rarity
trace(u"log_importance", log_importance)