Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Off by one bug in _filterLikelihoods redThreshold vs yellowThreshold #3870

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/nupic/algorithms/anomaly_likelihood.py
Expand Up @@ -631,7 +631,7 @@ def _filterLikelihoods(likelihoods,
if v <= redThreshold:
# Value is in the redzone

if likelihoods[i] > redThreshold:
if likelihoods[i-1] > redThreshold:
# Previous value is not in redzone, so leave as-is
filteredLikelihoods.append(v)
else:
Expand Down