This comment looks like it should be a doc string for the function:
http://www.python.org/dev/peps/pep-0257/#multi-line-docstrings

We already have the anomaly score calculation somewhere in the code (probably in the CLAModel). Perhaps we can pull it out as a utility function so you can use it here rather than re-implementing? Although your comment is very thorough so great job on documenting!