Skip to content

Commit

Permalink
Disabled spatial anomaly leads to terrible score for HTMcore
Browse files Browse the repository at this point in the history
  • Loading branch information
breznak committed Jul 30, 2019
1 parent 83eca07 commit 354a025
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
34 changes: 17 additions & 17 deletions config/thresholds.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@
},
"htmcore": {
"reward_low_FN_rate": {
"score": -1.6511067861578468,
"threshold": 0.5014187204194446
"score": -131.59491715795843,
"threshold": 0.4245631351291845
},
"reward_low_FP_rate": {
"score": 20.39992539458499,
"threshold": 0.5122987896930875
"score": -61.26700105675802,
"threshold": 0.50773323457344
},
"standard": {
"score": 30.348893213842153,
"threshold": 0.5014187204194446
"score": -53.862473972881986,
"threshold": 0.50773323457344
}
},
"htmjava": {
Expand Down Expand Up @@ -113,30 +113,30 @@
},
"numenta": {
"reward_low_FN_rate": {
"score": 26.634450197137568,
"threshold": 0.5421876907348634
"score": 26.634450197137596,
"threshold": 0.543099145074
},
"reward_low_FP_rate": {
"score": 30.431072517124093,
"threshold": 0.5751955032348636
"score": 30.645309205798327,
"threshold": 0.543099145074
},
"standard": {
"score": 46.634450197137596,
"threshold": 0.5421876907348634
"threshold": 0.543099145074
}
},
"numentaTM": {
"reward_low_FN_rate": {
"score": 8.764037437134272,
"threshold": 0.5126953125
"score": 9.428858702713455,
"threshold": 0.49424913259099995
},
"reward_low_FP_rate": {
"score": 15.463515082084744,
"threshold": 0.65076904296875
"score": 15.463515082084768,
"threshold": 0.651047950287
},
"standard": {
"score": 33.76403743713426,
"threshold": 0.5126953125
"score": 33.764037437134334,
"threshold": 0.512734098949
}
},
"random": {
Expand Down
2 changes: 1 addition & 1 deletion nab/detectors/htmcore/htmcore_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def modelRun(self, ts, val):
# handle spatial, contextual (raw, likelihood) anomalies
# -Spatial
spatialAnomaly = 0.0 #TODO optional: make this computed in SP (and later improve)
if self.useSpatialAnomaly:
if False and self.useSpatialAnomaly:
# Update min/max values and check if there is a spatial anomaly
if self.minVal != self.maxVal:
tolerance = (self.maxVal - self.minVal) * SPATIAL_TOLERANCE
Expand Down
2 changes: 1 addition & 1 deletion nab/detectors/numenta/numenta_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def handleRecord(self, inputData):
else:
finalScore = rawScore

if spatialAnomaly:
if False and spatialAnomaly:
finalScore = 1.0

return (finalScore, rawScore)
Expand Down
18 changes: 9 additions & 9 deletions results/final_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"standard": 16.43666922426724
},
"htmcore": {
"reward_low_FN_rate": 66.1922106936328,
"reward_low_FP_rate": 58.7930712907694,
"standard": 63.081419488725054
"reward_low_FN_rate": 28.85203529943721,
"reward_low_FP_rate": 23.591809889328452,
"standard": 26.783416390999154
},
"htmjava": {
"reward_low_FN_rate": 70.42407766520115,
Expand All @@ -35,14 +35,14 @@
"standard": 0.0
},
"numenta": {
"reward_low_FN_rate": 74.3202443095115,
"reward_low_FP_rate": 63.11684160219828,
"standard": 70.10105611943965
"reward_low_FN_rate": 74.32024430952228,
"reward_low_FP_rate": 63.20918500249927,
"standard": 70.10105611945585
},
"numentaTM": {
"reward_low_FN_rate": 69.18506822906035,
"reward_low_FP_rate": 56.665308225043105,
"standard": 64.55346441254311
"reward_low_FN_rate": 69.37610882261879,
"reward_low_FP_rate": 56.665308225036526,
"standard": 64.55346441255789
},
"random": {
"reward_low_FN_rate": 25.876351314080456,
Expand Down

0 comments on commit 354a025

Please sign in to comment.