def setParameter(self, name, index, value):
if name == "<STR_LIT>":<EOL><INDENT>self.learningMode = bool(int(value))<EOL>self._epoch = <NUM_LIT:0><EOL><DEDENT>elif name == "<STR_LIT>":<EOL><INDENT>self._epoch = <NUM_LIT:0><EOL>if int(value) and not self.inferenceMode:<EOL><INDENT>self._finishLearning()<EOL><DEDENT>self.inferenceMode = bool(int(value))<EOL><DEDENT>elif name == "<STR_LIT>":<EOL><INDENT>self._knn.distanceNorm = value<EOL><DEDENT>elif name == "<STR_LIT>":<EOL><INDENT>self._knn.distanceMethod = value<EOL><DEDENT>elif name == "<STR_LIT>":<EOL><INDENT>self.keepAllDistances = bool(value)<EOL>if not self.keepAllDistances:<EOL><INDENT>if self._protoScores is not None and self._protoScores.shape[<NUM_LIT:0>] > <NUM_LIT:1>:<EOL><INDENT>self._protoScores = self._protoScores[-<NUM_LIT:1>,:]<EOL><DEDENT>if self._protoScores is not None:<EOL><INDENT>self._protoScoreCount = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>self._protoScoreCount = <NUM_LIT:0><EOL><DEDENT><DEDENT><DEDENT>elif name == "<STR_LIT>":<EOL><INDENT>self.verbosity = value<EOL>self._knn.verbosity = value<EOL><DEDENT>else:<EOL><INDENT>return PyRegion.setParameter(self, name, index, value)<EOL><DEDENT>
Overrides :meth:`nupic.bindings.regions.PyRegion.PyRegion.setParameter`.