def buildHL0bTrainingSet(numOnes=5):
 numPatterns = 23
 p = getSimplePatterns(numOnes, numPatterns)
 s = []
 s.append(p[rgen.randint(5, numPatterns)])
 for i in xrange(50):
  r = rgen.randint(5, numPatterns)
  print r,
  s.append(p[r])
  if (rgen.binomial(1, 0.5) > 0):
   print 'S1',
   s.append(p[0])
   s.append(p[1])
   s.append(p[2])
   s.append(p[4])
  else:
   print 'S2',
   s.append(p[1])
   s.append(p[2])
   s.append(p[3])
  r = rgen.randint(5, numPatterns)
  s.append(p[r])
  print r,
 print
 return ([s], [[p[0], p[1], p[2], p[4]], [p[1], p[2], p[3]]])

def buildHL0bTrainingSet ( numOnes = 5 ) : numPatterns = 23 p = getSimplePatterns ( numOnes , numPatterns ) s = [ ] s . append ( p [ rgen . randint ( 5 , numPatterns ) ] ) for i in xrange ( 50 ) : r = rgen . randint ( 5 , numPatterns ) print r , s . append ( p [ r ] ) if ( rgen . binomial ( 1 , 0.5 ) > 0 ) : print 'S1' , s . append ( p [ 0 ] ) s . append ( p [ 1 ] ) s . append ( p [ 2 ] ) s . append ( p [ 4 ] ) else : print 'S2' , s . append ( p [ 1 ] ) s . append ( p [ 2 ] ) s . append ( p [ 3 ] ) r = rgen . randint ( 5 , numPatterns ) s . append ( p [ r ] ) print r , print return ( [ s ] , [ [ p [ 0 ] , p [ 1 ] , p [ 2 ] , p [ 4 ] ] , [ p [ 1 ] , p [ 2 ] , p [ 3 ] ] ] )
simple sequences for hl0b .