aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/new/jumpavg/BitCountingMetadata.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2018-06-13 13:04:01 +0200
committerTibor Frank <tifrank@cisco.com>2018-06-15 10:16:43 +0000
commita2a0ab1cdec3567dcad46c2000337707777aa0ca (patch)
tree8d6147d2fda535c5c32c432a4ea7f3ec3124c8d9 /resources/tools/presentation/new/jumpavg/BitCountingMetadata.py
parent5120b1082aa70f6e75511e9d95a2a7c303e25f9a (diff)
CSIT-1110: Prepare for migrating the new detection
+ Do not declare BitCountingClassifier.classify() as class method. + Make BitCountingGroupList subclass of list. + Inherit from abstract classes whenever possible. + Drop unneeded imports. + Add module docstrings and class docstrings anywhere. + Add TODOs hinting at possible improvements. Change-Id: Iccfff5c0e7be0607d6cfa74314083fcfe5a4d7d9 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/tools/presentation/new/jumpavg/BitCountingMetadata.py')
-rw-r--r--resources/tools/presentation/new/jumpavg/BitCountingMetadata.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/resources/tools/presentation/new/jumpavg/BitCountingMetadata.py b/resources/tools/presentation/new/jumpavg/BitCountingMetadata.py
index 67d111985f..d25d355cab 100644
--- a/resources/tools/presentation/new/jumpavg/BitCountingMetadata.py
+++ b/resources/tools/presentation/new/jumpavg/BitCountingMetadata.py
@@ -11,13 +11,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+"""Module holding BitCountingMetadata class."""
+
import math
from AvgStdevMetadata import AvgStdevMetadata
class BitCountingMetadata(AvgStdevMetadata):
- """Class for metadata which includes information content."""
+ """Class for metadata which includes information content of a group.
+
+ The information content is based on an assumption
+ that the data consists of independent random values
+ from a normal distribution.
+ """
def __init__(self, max_value, size=0, avg=0.0, stdev=0.0, prev_avg=None):
"""Construct the metadata by computing from the values needed.