Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knn_anomaly_classifier_region_test.py #23

Open
chhenning opened this issue Jan 18, 2018 · 0 comments
Open

knn_anomaly_classifier_region_test.py #23

chhenning opened this issue Jan 18, 2018 · 0 comments

Comments

@chhenning
Copy link
Owner

................D:\nupic\src\python\python3\nupic\algorithms\knn_classifier.py:358: DeprecationWarning: using a non-integer array as obj in delete will result in an error in the future
  removalArray).tolist()
D:\nupic\src\python\python3\nupic\algorithms\knn_classifier.py:362: DeprecationWarning: using a non-integer array as obj in delete will result in an error in the future
  numpy.array(self._categoryRecencyList), removalArray).tolist()
.E.Fs
======================================================================
ERROR: testSetGetWaitRecordsRecalculate (__main__.KNNAnomalyClassifierRegionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python36\lib\unittest\mock.py", line 1179, in patched
    return func(*args, **keywargs)
  File "knn_anomaly_classifier_region_test.py", line 342, in testSetGetWaitRecordsRecalculate
    self.helper.compute(dict(), dict())
  File "D:\nupic\src\python\python3\nupic\regions\knn_anomaly_classifier_region.py", line 326, in compute
    self._classifyState(record)
  File "D:\nupic\src\python\python3\nupic\regions\knn_anomaly_classifier_region.py", line 370, in _classifyState
    newCategory = self._recomputeRecordFromKNN(state)
  File "D:\nupic\src\python\python3\nupic\regions\knn_anomaly_classifier_region.py", line 564, in _recomputeRecordFromKNN
    self._knnclassifier.compute(inputs, outputs)
  File "D:\nupic\src\python\python3\nupic\regions\knn_classifier_region.py", line 964, in compute
    self._knn.infer(inputVector, partitionId=partition)
  File "D:\nupic\src\python\python3\nupic\algorithms\knn_classifier.py", line 736, in infer
    self._categoryList, dist)
RuntimeError: Buffer access out of bounds.

======================================================================
FAIL: testUpdateState (__main__.KNNAnomalyClassifierRegionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python36\lib\unittest\mock.py", line 1179, in patched
    return func(*args, **keywargs)
  File "knn_anomaly_classifier_region_test.py", line 433, in testUpdateState
    [recordCopy["anomalyLabel"][0], toLabelList.return_value[0]])
AssertionError: Lists differ: ['Label 2', 'Label'] != ['Label', 'Label 2']

First differing element 0:
'Label 2'
'Label'

- ['Label 2', 'Label']
?        --

+ ['Label', 'Label 2']
?                 ++


----------------------------------------------------------------------
Ran 21 tests in 0.046s

FAILED (failures=1, errors=1, skipped=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant