How to detect anomalies based on types?

Hi,
I’m trying to set up a program that detects anomalies where the input is one datetime field and the other is a type that is represented with string. I have been trying to keep it a string but have yet to figure out how to do that. So right now i have converted it to integer representations. But i get a lot of false positives (anomaly probability >99%), even on the tests I have synthesized, where there is one event of the same type at the same time every day ( ~1k inputs).
To do this I have been working from the code for the hotgym example. I have been trying to read up on how to configure the model params by looking at the comments in the model.yaml file, at the quick start guide and in the forum for help.

What I’m trying to ask is:

  • How can I cofigure the program to detect anomalies in types?
  • Where do I start to configure the model params to try to get fewer false positives?

Thanks!

1 Like

The term “anomaly probability” is not one I recognize with NuPIC. Are you talking about “anomaly score” or “anomaly likelihood”?

Here is an example of encoding categories. Here are the encoder params:

Here is the code dealing with getting encodings from the category encoder:

The false positives may not be identified properly. See my question about anomaly score vs likelihood above.