Code to measure the accuracy in HTM.Core

Hi,

I have been trying to use HTM.Core for one of the works in 5G Network slicing anomaly detection. For this, I have followed the example of hotgym.py. I want to capture the accuracy of anomaly detection overall. Though I can get the plot of anomaly likelihood, and instantaneous anomaly as per hotgym.py, I could not get how to measure the accuracy here for anomaly detection and even for prediction by HTM. Any directions/example code will be very helpful.

Thanks
Shwetha