def _addRecordToKNN(self, record):
knn = self._knnclassifier._knn<EOL>prototype_idx = self._knnclassifier.getParameter('<STR_LIT>')<EOL>category = self._labelListToCategoryNumber(record.anomalyLabel)<EOL>if record.ROWID in prototype_idx:<EOL><INDENT>knn.prototypeSetCategory(record.ROWID, category)<EOL>return<EOL><DEDENT>pattern = self._getStateAnomalyVector(record)<EOL>rowID = record.ROWID<EOL>knn.learn(pattern, category, rowID=rowID)<EOL>
Adds the record to the KNN classifier.