def __validate_pattern(self, pattern):
if (len(pattern) != len(self)):<EOL><INDENT>raise NameError('<STR_LIT>' + len(pattern) + '<STR_LIT>');<EOL><DEDENT>for feature in pattern:<EOL><INDENT>if ( (feature != -<NUM_LIT:1.0>) and (feature != <NUM_LIT:1.0>) ):<EOL><INDENT>raise NameError('<STR_LIT>' + feature + '<STR_LIT>');<EOL><DEDENT><DEDENT>
!
        @brief Validates pattern.
        @details Throws exception if length of pattern is not equal to size of the network or if it consists feature with value that are not equal to [-1; 1].

        @param[in] pattern (list): Pattern for recognition represented by list of features that are equal to [-1; 1].