code: def average_weights(self):
          
          for feat, weights in self.weights.items():
              new_feat_weights = {}
              for clas, weight in weights.items():
                  param = (feat, clas)
                  total = self._totals[param]
                  total += (self.i - self._tstamps[param]) * weight
                  averaged = round(total / float(self.i), 3)
                  if averaged:
                      new_feat_weights[clas] = averaged
              self.weights[feat] = new_feat_weights
          return None
docs: Average weights from all iterations.