def _buildLikelihoodTrainingSet(numOnes=5, relativeFrequencies=None):
 numPatterns = 7
 p = _getSimplePatterns(numOnes, numPatterns)
 s1 = [p[0], p[1], p[2], p[3], p[4]]
 s2 = [p[0], p[1], p[2], p[3], p[5]]
 s3 = [p[0], p[1], p[2], p[3], p[6]]
 trainingSequences = [s1, s2, s3]
 allPatterns = p
 return (trainingSequences, relativeFrequencies, allPatterns)

def _buildLikelihoodTrainingSet ( numOnes = 5 , relativeFrequencies = None ) : numPatterns = 7 p = _getSimplePatterns ( numOnes , numPatterns ) s1 = [ p [ 0 ] , p [ 1 ] , p [ 2 ] , p [ 3 ] , p [ 4 ] ] s2 = [ p [ 0 ] , p [ 1 ] , p [ 2 ] , p [ 3 ] , p [ 5 ] ] s3 = [ p [ 0 ] , p [ 1 ] , p [ 2 ] , p [ 3 ] , p [ 6 ] ] trainingSequences = [ s1 , s2 , s3 ] allPatterns = p return ( trainingSequences , relativeFrequencies , allPatterns )
two very simple high order sequences for debugging .