def _recomputeRecordFromKNN(self, record):
inputs = {<EOL>"<STR_LIT>": [None],<EOL>"<STR_LIT>": self._getStateAnomalyVector(record),<EOL>}<EOL>outputs = {"<STR_LIT>": numpy.zeros((<NUM_LIT:1>,)),<EOL>"<STR_LIT>":numpy.zeros((<NUM_LIT:1>,)),<EOL>"<STR_LIT>":numpy.zeros((<NUM_LIT:1>,))}<EOL>classifier_indexes = numpy.array(<EOL>self._knnclassifier.getParameter('<STR_LIT>'))<EOL>valid_idx = numpy.where(<EOL>(classifier_indexes >= self.getParameter('<STR_LIT>')) &<EOL>(classifier_indexes < record.ROWID)<EOL>)[<NUM_LIT:0>].tolist()<EOL>if len(valid_idx) == <NUM_LIT:0>:<EOL><INDENT>return None<EOL><DEDENT>self._knnclassifier.setParameter('<STR_LIT>', None, True)<EOL>self._knnclassifier.setParameter('<STR_LIT>', None, False)<EOL>self._knnclassifier.compute(inputs, outputs)<EOL>self._knnclassifier.setParameter('<STR_LIT>', None, True)<EOL>classifier_distances = self._knnclassifier.getLatestDistances()<EOL>valid_distances = classifier_distances[valid_idx]<EOL>if valid_distances.min() <= self._classificationMaxDist:<EOL><INDENT>classifier_indexes_prev = classifier_indexes[valid_idx]<EOL>rowID = classifier_indexes_prev[valid_distances.argmin()]<EOL>indexID = numpy.where(classifier_indexes == rowID)[<NUM_LIT:0>][<NUM_LIT:0>]<EOL>category = self._knnclassifier.getCategoryList()[indexID]<EOL>return category<EOL><DEDENT>return None<EOL>
returns the classified labeling of record