numenta / NAB

The Numenta Anomaly Benchmark
GNU Affero General Public License v3.0
1.93k stars 869 forks source link

Understanding the sigmoid scale ($A_TP$-$A_FP$) in the original paper #405

Open AndrewLawrence80 opened 7 months ago

AndrewLawrence80 commented 7 months ago

According to the paper Section II.C, the weights $A{TP}$ and $A{FP}$ in the scoring function are bounded to $0\leq A{TP} \leq 1$ and $-1\leq A{FP}\leq 0$, but to satisfy the following scoring function $$\sigma^A(y)=(A{TP}-A{FP})\dfrac{1}{1+e^{5y}}-1$$ to $\sigma^A(0)=0$ only allows for $A{TP}=1$ and $A{FP}=-1$ should $\sigma^A$ goes with another hyper-parameter $\alpha$ to meet the satisfaction as follows $$\sigma^A(y)=\alpha(A{TP}-A{FP})\dfrac{1}{1+e^{5y}}-1$$ and to control the reward gained by how early or late the anomaly detected, replace fixed scale 5 with another hyper-parameter $\beta$ as follows $$\sigma^A(y)=\alpha(A{TP}-A{FP})\dfrac{1}{1+e^{\beta y}}-1$$