I am using a KNN anomaly detection approach, where the distance to my nearest neighbor is an indication for an anomaly.
I am wondering how I can normalize the score between 0 and 1. I can use a test dataset without anomalies to get the normal data distribution. When I calculate the z-score it's not bounded between 0 and 1. The sigmoid function applied on the z-score returns too high values.
Is there some statistical approach based on the data distribution that returns a probability value that my distance value (or z-score) is an outlier?