def _testConfig(baseParams, expMissingMin=0, expMissingMax=0, **mods):
 params = dict(baseParams)
 params.update(mods)
 func = params['seqFunction']
 (numCols, trainingSequences) = func(**params)
 if (params['numCols'] is None):
  params['numCols'] = numCols
 tps = createTPs(**params)
 tpStats = evalSequences(tps=tps, trainingSequences=trainingSequences, testSequences=None, **params)
 for (name, stats) in tpStats.iteritems():
  print ('Detected %d missing predictions overall during inference' % stats['totalMissing'])
  if ((expMissingMin is not None) and (stats['totalMissing'] < expMissingMin)):
   print ('FAILURE: Expected at least %d total missing but got %d' % (expMissingMin, stats['totalMissing']))
   assert False
  if ((expMissingMax is not None) and (stats['totalMissing'] > expMissingMax)):
   print ('FAILURE: Expected at most %d total missing but got %d' % (expMissingMax, stats['totalMissing']))
   assert False
 return True

def _testConfig ( baseParams , expMissingMin = 0 , expMissingMax = 0 , ** mods ) : params = dict ( baseParams ) params . update ( mods ) func = params [ 'seqFunction' ] ( numCols , trainingSequences ) = func ( ** params ) if ( params [ 'numCols' ] is None ) : params [ 'numCols' ] = numCols tps = createTPs ( ** params ) tpStats = evalSequences ( tps = tps , trainingSequences = trainingSequences , testSequences = None , ** params ) for ( name , stats ) in tpStats . iteritems ( ) : print ( 'Detected %d missing predictions overall during inference' % stats [ 'totalMissing' ] ) if ( ( expMissingMin is not None ) and ( stats [ 'totalMissing' ] < expMissingMin ) ) : print ( 'FAILURE: Expected at least %d total missing but got %d' % ( expMissingMin , stats [ 'totalMissing' ] ) ) assert False if ( ( expMissingMax is not None ) and ( stats [ 'totalMissing' ] > expMissingMax ) ) : print ( 'FAILURE: Expected at most %d total missing but got %d' % ( expMissingMax , stats [ 'totalMissing' ] ) ) assert False return True
build up a set of sequences .