Skip to content

Commit

Permalink
Merge pull request #66 from jambit/dcs
Browse files Browse the repository at this point in the history
  • Loading branch information
opcode81 committed May 17, 2023
2 parents 0eccda2 + 641014d commit 034cf8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/sensai/util/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ class DistributionCounter(ToStringMixin):
Supports the counting of the frequencies with which (mutually exclusive) events occur
"""
def __init__(self):
self.counts = collections.defaultdict(lambda: 0)
self.counts = collections.defaultdict(self._zero)
self.totalCount = 0

@staticmethod
def _zero():
return 0

def count(self, event: Hashable) -> None:
"""
Increments the count of the given event
Expand Down
1 change: 0 additions & 1 deletion src/sensai/util/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import pandas as pd

from sensai.util.deprecation import deprecated

log = getLogger(__name__)

Expand Down

0 comments on commit 034cf8a

Please sign in to comment.