Hello!
Im seen that in all graphics with anomaly score values lay in 0.0-1.0 range. For example:
Please, can you explain proper way to calculate anomaly score?
In my implementation i sometimes get values greater than one, it seems to me that this is not correct:
learn() {
this.anomalyScore = 0
for (const column of this.columns) {
if (this.isColumnActive(column)) {
if (this.isColumnPredicted(column)) {
this.activatePredictedColumn(column)
} else {
this.burstColumn(column)
++this.anomalyScore
}
} else {
if (this.isColumnPredicted(column)) {
this.punishWrongPredictions(column)
++this.anomalyScore
}
}
}
this.anomalyScore /= this.spatialPooler.getMaxActiveColumns()
this.anomalyScore = Math.min(this.anomalyScore, 1.0) // sometimes this.anomalyScore > 1.0
console.log('anomaly score', this.anomalyScore)
}