def verify_evidence(self, evBound=0.00001, prevBound=0, lapFrac=None):
    ''' Compare current and previous evidence (ELBO) values,
        verify that (within numerical tolerance) increases monotonically
    '''
    if np.isnan(evBound):
      raise ValueError("Evidence should never be NaN")
    if np.isinf(prevBound):
      return False
    isIncreasing = prevBound <= evBound
    M = self.algParams['convergeSigFig']
    isWithinTHR = closeAtMSigFigs(prevBound, evBound, M=M)
    mLPkey = 'doMemoizeLocalParams'
    if not isIncreasing and not isWithinTHR:
      serious = True
      if self.hasMove('birth') \
         and (0 > len(self.BirthCompIDs) or len(self.ModifiedCompIDs) > 0):
        warnMsg = 'ev decreased during a birth'
        warnMsg += ' (so monotonic increase not guaranteed)\n'
        serious = False
      elif mLPkey in self.algParams and not self.algParams[mLPkey]:
        warnMsg = 'ev decreased when doMemoizeLocalParams=0'
        warnMsg += ' (so monotonic increase not guaranteed)\n'
        serious = False
      else:
        warnMsg = 'evidence decreased!\n'
      warnMsg += '    prev = % .15e\n' % (prevBound)
      warnMsg += '     cur = % .15e\n' % (evBound)
      if lapFrac is None:
        prefix = "WARNING: "
      else:
        prefix = "WARNING @ %.3f: " % (lapFrac)

      if serious or not self.algParams['doShowSeriousWarningsOnly']:
        Log.error(prefix + warnMsg)
    return isWithinTHR 


  #########################################################  Save to file
  #########################################################
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/learnalg/LearnAlg.py/LearnAlg.verify_evidence/swapped operands of `>`