def getHighOrderSequenceChunk(it, switchover=1000, w=40, n=2048):
  """
  Given an iteration index, returns a list of vectors to be appended to the
  input stream, as well as a string label identifying the sequence. This
  version generates a bunch of high order sequences. The first element always
  provides sufficient context to predict the rest of the elements.

  After switchover iterations, it will generate a different set of sequences.
  """
  if it%10==3:
    s = numpy.random.randint(5)
    if it <= switchover:
      if s==0:
        label="XABCDE"
      elif s==1:
        label="YCBEAF"
      elif s==2:
        label="GHIJKL"
      elif s==3:
        label="WABCMN"
      else:
        label="ZDBCAE"
    else:
      if s==0:
        label="XCBEAF"
      elif s==1:
        label="YABCDE"
      elif s==2:
        label="GABCMN"
      elif s==3:
        label="WHIJKL"
      else:
        label="ZDHICF"

    vecs = letterSequence(label)
  else:
    vecs= [getRandomVector(w, n)]
    label="."

  return vecs,label
def getHighOrderSequenceChunk ( it , switchover = 1000 , w = 40 , n = 2048 ) : if it % 10 == 3 : s = numpy . random . randint ( 5 ) if it <= switchover : if s == 0 : label = "XABCDE" elif s == 1 : label = "YCBEAF" elif s == 2 : label = "GHIJKL" elif s == 3 : label = "WABCMN" else : label = "ZDBCAE" else : if s == 0 : label = "XCBEAF" elif s == 1 : label = "YABCDE" elif s == 2 : label = "GABCMN" elif s == 3 : label = "WHIJKL" else : label = "ZDHICF" vecs = letterSequence ( label ) else : vecs = [ getRandomVector ( w , n ) ] label = "." return vecs , label
Given an iteration index, returns a list of vectors to be appended to the
  input stream, as well as a string label identifying the sequence. This
  version generates a bunch of high order sequences. The first element always
  provides sufficient context to predict the rest of the elements.

  After switchover iterations, it will generate a different set of sequences.