def _mmUpdateDutyCycles(self):
    """
    Update the duty cycle variables internally tracked by the TM mixin.
    """
    period = self.getDutyCyclePeriod()

    unionSDRArray = numpy.zeros(self.getNumColumns())
    unionSDRArray[list(self._mmTraces["unionSDR"].data[-1])] = 1

    self._mmData["unionSDRDutyCycle"] = \
      UnionTemporalPoolerMonitorMixin._mmUpdateDutyCyclesHelper(
        self._mmData["unionSDRDutyCycle"], unionSDRArray, period)

    self._mmData["persistenceDutyCycle"] = \
      UnionTemporalPoolerMonitorMixin._mmUpdateDutyCyclesHelper(
        self._mmData["persistenceDutyCycle"], self._poolingActivation, period)
def _mmUpdateDutyCycles ( self ) : period = self . getDutyCyclePeriod ( ) unionSDRArray = numpy . zeros ( self . getNumColumns ( ) ) unionSDRArray [ list ( self . _mmTraces [ "unionSDR" ] . data [ - 1 ] ) ] = 1 self . _mmData [ "unionSDRDutyCycle" ] = UnionTemporalPoolerMonitorMixin . _mmUpdateDutyCyclesHelper ( self . _mmData [ "unionSDRDutyCycle" ] , unionSDRArray , period ) self . _mmData [ "persistenceDutyCycle" ] = UnionTemporalPoolerMonitorMixin . _mmUpdateDutyCyclesHelper ( self . _mmData [ "persistenceDutyCycle" ] , self . _poolingActivation , period )
Update the duty cycle variables internally tracked by the TM mixin.